py-mysql2pgsql
py-mysql2pgsql copied to clipboard
ValueError: invalid literal for int() with base 10: "b'0'"
Using BIT on mysql/mariadb
Two suggestions, without seeing the DB that you're using it on.
~~When I've had this in the past it's been because the column setting on the originating database was a CharField (Char/Varchar) rather than an int. Can you supply the schema for the original table, and the full traceback?~~ Ignore this, I didn't read the incredibly short issue properly. :D
Second thought - Are you using Python 2 or 3? You might run into problems if you've used Six to convert code and then using this module - if you're on python three then you might need to do a PR to add handling for that. Afaict and in the docs, it's only tested on 2.6 and 2.7. The bytestream flag should be ignored in Python2 and six won't convert it, which might lead to problems here.
In order to ease the 2.x-to-3.x transition, the b'...' literal syntax was backported to Python 2.6, in order to allow distinguishing binary strings (which should be bytes in 3.x) from text strings (which should be str in 3.x). The b prefix does nothing in 2.x, but tells the 2to3 script not to convert it to a Unicode string in 3.x.
It does look as though it's not picking up the bit field correctly when reading the data types, though.
Hi @iamwithnail.
I am using 2.7 version.
I ended up using the nodejs version of this. (1 problem though, it doesn't seem to import the partitions on tables)
Thanks!
Any hint to solve this issue, please? Thanks.
Sorry, I can't try your recomendation because I found other way
Вторник, 23 октября 2018, 22:18 +03:00 от Tomáš Myšík [email protected]:
Any hint to solve this issue, please? Thanks. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub , or mute the thread .
I wish you be loved