Comments (3)
Hello,
I have got the same error trying to convert a table from a MySQL database. The table has the following schema:
CREATE TABLE IF NOT EXISTS ville
(
id
int(11) NOT NULL AUTO_INCREMENT,
nom
varchar(100) NOT NULL,
wikidata
varchar(20) NOT NULL,
idref
varchar(10) NOT NULL,
pays_id
int(11),
latitude
decimal(13,10),
longitude
decimal(13,10),
PRIMARY KEY (id
),
KEY ville_10741763
(pays_id
)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=720 ;
However, after running:
pipenv run db-to-sqlite "mysql://user@localhost/database" database.db --table=ville -p
The following error is displayed:
qlite3.InterfaceError: Error binding parameter 1 - probably unsupported type.
and database.db contains (among other things, but without any data):
CREATE TABLE [ville] (
[id] INTEGER PRIMARY KEY,
[nom] TEXT,
[wikidata] TEXT,
[idref] TEXT,
[pays_id] TEXT,
[latitude] TEXT,
[longitude] TEXT
)
I am using Python 3.8.0 and the followings libraries:
aiofiles 0.4.0
Click 7.0
click-default-group 1.2.2
csvs-to-sqlite 1.0
datasette 0.33
datasette-cluster-map 0.8
datasette-vega 0.6.2
dateparser 0.7.2
db-to-sqlite 1.0.2
h11 0.9.0
httptools 0.0.13
hupper 1.9.1
Jinja2 2.10.3
MarkupSafe 1.1.1
mysqlclient 1.4.6
numpy 1.18.1
pandas 0.25.3
Pint 0.10.1
pip 19.3.1
pluggy 0.13.1
py-lru-cache 0.1.4
pylzma 0.5.0
python-dateutil 2.8.1
pytz 2019.3
regex 2020.1.8
setuptools 42.0.1
six 1.14.0
SQLAlchemy 1.3.12
sqlite-utils 2.0.1
tabulate 0.8.6
tzlocal 2.0.0
uvicorn 0.11.2
uvloop 0.14.0
websockets 8.1
wheel 0.33.6
Thanks,
from db-to-sqlite.
The unique column types in that first example are:
char(1) DEFAULT NULL,
decimal(2,1) DEFAULT NULL,
decimal(3,1) DEFAULT NULL,
int(11) DEFAULT NULL,
mediumint(9) DEFAULT NULL,
smallint(3) unsigned DEFAULT NULL,
smallint(6) DEFAULT NULL,
text,
tinyint(2) unsigned DEFAULT NULL,
varchar(10) DEFAULT NULL,
varchar(12) DEFAULT NULL,
varchar(16) NOT NULL,
varchar(2) DEFAULT NULL,
varchar(50) DEFAULT NULL,%
The only one that looks suspicious there is decimal
- which is present in the second example too.
from db-to-sqlite.
It's possible that this bug has been fixed by either the latest sqlite-utils
or the latest SQLAlchemy - I'm going to close this as can't reproduce, please comment here if you run into it again.
from db-to-sqlite.
Related Issues (20)
- Correctly duplicate empty tables HOT 11
- Decoding error when charset not correctly specified in connection string HOT 1
- postgresql - search_path HOT 1
- Switch CI to GitHub Actions HOT 9
- Can't load plugin: sqlalchemy.dialects:postgres HOT 4
- Is it possible to export from a SQLite database?
- Views, Materialized Views, Functions not exported from Postgres database to SQLite file HOT 1
- TZ flag for migrating datetime columns?
- Multiple Postgres Schemas?
- Add option for selecting tables to copy by a (regex) pattern HOT 1
- SQLite version supporting the RETURNING clause
- SQLite version supporting the RETURNING clause #42
- sqlite3.OperationalError: table sqlite_master may not be modified
- Upgrade for compatibility with SQLAlchemy 2 HOT 7
- Some of the tests are hanging in CI HOT 12
- Is it possible to create PostgreSQL views in the SQLite database?
- MySQL bool columns end up as SQLite BLOB columns upon conversion
- MySQL tests fail after multiple runs
- Is it possible to skip tables if they do not exist?
- Postgres JSONB columns are converted to Sqlite TEXT columns, not JSON
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from db-to-sqlite.