{"action":"created","issue":{"url":"https://api.github.com/repos/dimitri/pgloader/issues/248","labels_url":"https://api.github.com/repos/dimitri/pgloader/issues/248/labels{/name}","comments_url":"https://api.github.com/repos/dimitri/pgloader/issues/248/comments","events_url":"https://api.github.com/repos/dimitri/pgloader/issues/248/events","html_url":"https://github.com/dimitri/pgloader/issues/248","id":88801837,"number":248,"title":"Importing from SQLite fails","user":{"login":"tapio-lehtonen","id":12916668,"avatar_url":"https://avatars.githubusercontent.com/u/12916668?v=3","gravatar_id":"","url":"https://api.github.com/users/tapio-lehtonen","html_url":"https://github.com/tapio-lehtonen","followers_url":"https://api.github.com/users/tapio-lehtonen/followers","following_url":"https://api.github.com/users/tapio-lehtonen/following{/other_user}","gists_url":"https://api.github.com/users/tapio-lehtonen/gists{/gist_id}","starred_url":"https://api.github.com/users/tapio-lehtonen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tapio-lehtonen/subscriptions","organizations_url":"https://api.github.com/users/tapio-lehtonen/orgs","repos_url":"https://api.github.com/users/tapio-lehtonen/repos","events_url":"https://api.github.com/users/tapio-lehtonen/events{/privacy}","received_events_url":"https://api.github.com/users/tapio-lehtonen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-16T18:21:29Z","updated_at":"2015-06-17T13:59:22Z","closed_at":null,"body":"Trying to import SQLite database. No luck so far.\r\n\r\nI try pgloader --verbose pgloader-simple.test\r\nand that file is:\r\n```\r\nroot@jessie-db:/home/sysman# cat pgloader-simple.test \r\nLOAD DATABASE\r\n       FROM sqlite:///home/sysman/laskutus-ilmanlogoa.sqlite\r\n       INTO postgresql:///postgres@localhost/satatuulilaskutus;\r\nroot@jessie-db:/home/sysman# \r\n```\r\nAs far as I can see this should work, mostly copied it from man page and or web site.\r\n\r\nResults:\r\n\r\n    root@jessie-db:/home/sysman# pgloader --verbose pgloader-simple.test\r\n    An unhandled error condition has been signalled:\r\n       Could not parse subexpression \";\" when parsing\r\n\r\n     Expression PGLOADER.PARSER::COMMANDS\r\n        Subexpression (+ PGLOADER.PARSER::COMMAND)\r\n        Subexpression PGLOADER.PARSER::COMMAND\r\n        Subexpression (AND\r\n                       (OR PGLOADER.PARSER::LOAD-ARCHIVE\r\n                           PGLOADER.PARSER::LOAD-CSV-FILE\r\n                            PGLOADER.PARSER::LOAD-FIXED-COLS-FILE\r\n                           PGLOADER.PARSER::LOAD-DBF-FILE\r\n                           PGLOADER.PARSER::LOAD-IXF-FILE\r\n                           PGLOADER.PARSER::LOAD-MYSQL-DATABASE\r\n                           PGLOADER.PARSER::LOAD-SQLITE-DATABASE\r\n                           PGLOADER.PARSER::LOAD-SYSLOG-MESSAGES)\r\n                       PGLOADER.PARSER::END-OF-COMMAND)\r\n        Subexpression PGLOADER.PARSER::END-OF-COMMAND\r\n        Subexpression (AND PGLOADER.PARSER::IGNORE-WHITESPACE #\\;\r\n                           PGLOADER.PARSER::IGNORE-WHITESPACE)\r\n        Subexpression \";\"\r\n\r\n      Encountered at:\r\n        LOAD DATABASE\r\n       FROM sq\r\n        ^ (Line 1, Column 0, Position 0)\r\n\r\nIf I try from command line, I get:\r\n\r\n```\r\nroot@jessie-db:/home/sysman# pgloader ./laskutus-ilmanlogoa.sqlite postgresql:///satatuulilaskutus\r\nAn unhandled error condition has been signalled:\r\n   :UTF-8 stream decoding error on\r\n   #<SB-SYS:FD-STREAM for \"file /home/sysman/laskutus-ilmanlogoa.sqlite\"\r\n     {10084D8903}>:\r\n\r\n     the octet sequence #(219 0) cannot be decoded.\r\n\r\nroot@jessie-db:/home/sysman#\r\n```\r\n\r\nThere might be some strange character in the database, typing error perhaps. I make an SQL dump, that is a text file, and tried to find that character in there. No luck. \r\n\r\nI do not understand why the command file fails so miserably. Is the Encountered at position completely wrong? The syntax seems OK to me, at least it should work a little bit. "},"comment":{"url":"https://api.github.com/repos/dimitri/pgloader/issues/comments/112811265","html_url":"https://github.com/dimitri/pgloader/issues/248#issuecomment-112811265","issue_url":"https://api.github.com/repos/dimitri/pgloader/issues/248","id":112811265,"user":{"login":"dimitri","id":102900,"avatar_url":"https://avatars.githubusercontent.com/u/102900?v=3","gravatar_id":"","url":"https://api.github.com/users/dimitri","html_url":"https://github.com/dimitri","followers_url":"https://api.github.com/users/dimitri/followers","following_url":"https://api.github.com/users/dimitri/following{/other_user}","gists_url":"https://api.github.com/users/dimitri/gists{/gist_id}","starred_url":"https://api.github.com/users/dimitri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimitri/subscriptions","organizations_url":"https://api.github.com/users/dimitri/orgs","repos_url":"https://api.github.com/users/dimitri/repos","events_url":"https://api.github.com/users/dimitri/events{/privacy}","received_events_url":"https://api.github.com/users/dimitri/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T13:59:22Z","updated_at":"2015-06-17T13:59:22Z","body":"Thanks. Still not quite enough information tho. Is it possible for you to hand me the sqlite file (e.g. by private email) for me to debug?"}}