techouse / sqlite3-to-mysql

Transfer data from SQLite to MySQL

Home Page:https://techouse.github.io/sqlite3-to-mysql/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invalid literal

Tomut0 opened this issue · comments

Describe the bug
Duplicated of #18 .

2022-03-12 17:23:10 INFO     Transferring table Goods
invalid literal for int() with base 10: b'01 00:00:00'

Expected behaviour
Well, converted table.

Actual result
Not converted table. :(

System Information

$ sqlite3mysql --version
[root@maplecraft html]# sqlite3mysql --version
| software               | version                                                     |
|------------------------|-------------------------------------------------------------|
| sqlite3-to-mysql       | 1.4.11                                                      |
|                        |                                                             |
| Operating System       | Linux 4.18.0-305.25.1.el8_4.x86_64                          |
| Python                 | CPython 3.6.8                                               |
| MySQL                  | mysql  Ver 8.0.26 for Linux on x86_64 (Source distribution) |
| SQLite                 | 3.26.0                                                      |
|                        |                                                             |
| click                  | 8.0.4                                                       |
| mysql-connector-python | 8.0.28                                                      |
| pytimeparse            | 1.1.8                                                       |
| simplejson             | 3.17.6                                                      |
| six                    | 1.16.0                                                      |
| tabulate               | 0.8.9                                                       |
| tqdm                   | 4.63.0                                                      |

Additional context
The link on SQL Dump: link
It's not the full dump actually, but I think it is the place of the problem.

What's weird in your SQL is that it's using DATE where the field should be DATETIME. DATE alone can't hold time data.

My hunch was correct. It comes from this line here.

I changed DATE in your SQLite to DATETIME and it worked as expected.

What's weird in your SQL is that it's using DATE where the field should be DATETIME. DATE alone can't hold time data.

Yeah, looks like my bad. Thanks. 😃

I'll still go ahead and implement a custom converter as the stock one doesn't work as expected even with normal dates it seems.