{"action":"created","issue":{"url":"https://api.github.com/repos/dbcli/mycli/issues/155","labels_url":"https://api.github.com/repos/dbcli/mycli/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/dbcli/mycli/issues/155/comments","events_url":"https://api.github.com/repos/dbcli/mycli/issues/155/events","html_url":"https://github.com/dbcli/mycli/issues/155","id":107483474,"number":155,"title":"mycli crashes with pymysql 0.6.2","user":{"login":"lhw","id":351875,"avatar_url":"https://avatars.githubusercontent.com/u/351875?v=3","gravatar_id":"","url":"https://api.github.com/users/lhw","html_url":"https://github.com/lhw","followers_url":"https://api.github.com/users/lhw/followers","following_url":"https://api.github.com/users/lhw/following{/other_user}","gists_url":"https://api.github.com/users/lhw/gists{/gist_id}","starred_url":"https://api.github.com/users/lhw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhw/subscriptions","organizations_url":"https://api.github.com/users/lhw/orgs","repos_url":"https://api.github.com/users/lhw/repos","events_url":"https://api.github.com/users/lhw/events{/privacy}","received_events_url":"https://api.github.com/users/lhw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-09-21T10:25:55Z","updated_at":"2015-09-24T01:03:23Z","closed_at":null,"body":"The bug which caused the crash with `pymysql 0.6.2` (#83) still exists. `pymysql 0.6.6` only handles it gracefully. ConfigObj is unable to parse the MySQL config files. Which later on caused a crash with pymysql not handling an empty field/fields correctly. Version here is `mycli 1.4.0`\r\n```\r\n2015-09-21 12:58:51,768 (17883/MainThread) mycli DEBUG - Initializing mycli logging.\r\n2015-09-21 12:58:51,769 (17883/MainThread) mycli DEBUG - Log file '~/.mycli.log'.\r\n2015-09-21 12:58:51,770 (17883/MainThread) mycli.main ERROR - Error parsing u'/etc/mysql/my.cnf'.\r\n2015-09-21 12:58:51,770 (17883/MainThread) mycli.main ERROR - Recovering partially parsed config values.\r\n2015-09-21 12:58:51,772 (17883/MainThread) mycli.main ERROR - Error parsing u'/etc/mysql/my.cnf'.\r\n2015-09-21 12:58:51,772 (17883/MainThread) mycli.main ERROR - Recovering partially parsed config values.\r\n2015-09-21 12:58:51,773 (17883/MainThread) mycli.sqlexecute DEBUG - Connection DB Params: \r\n        database: None  user: u'root'   host: u'localhost'      port: 3306      socket: '/var/run/mysqld/mysqld.sock'   charset: u'utf8'\r\n2015-09-21 12:58:54,534 (17883/MainThread) mycli.sqlexecute DEBUG - Connection DB Params: \r\n        database: None  user: u'root'   host: u'localhost'      port: 3306      socket: '/var/run/mysqld/mysqld.sock'   charset: u'utf8'\r\n2015-09-21 12:58:54,537 (17883/MainThread) mycli.main DEBUG - Launch Params: \r\n        database: None  user: u'root'   host: None      port: None\r\n2015-09-21 12:58:54,537 (17883/MainThread) mycli.main DEBUG - Original value for LESS env var: '-R'\r\n2015-09-21 12:58:54,540 (17883/MainThread) mycli.main ERROR - Error parsing u'/etc/mysql/my.cnf'.\r\n2015-09-21 12:58:54,540 (17883/MainThread) mycli.main ERROR - Recovering partially parsed config values.\r\n\r\n```\r\nMy current config is basically the standard MariaDB config, I put them up in a gist here: https://gist.github.com/lhw/c4893fe72f9141129357\r\n\r\nApparently ConfigObj is not able to parse lines which have no assignment. Like `skip-external-locking`\r\n```python\r\n>>> from configobj import ConfigObj\r\n>>> c = ConfigObj(\"/etc/mysql/my.cnf\")\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/lib/python2.7/dist-packages/configobj.py\", line 1229, in __init__\r\n    self._load(infile, configspec)\r\n  File \"/usr/lib/python2.7/dist-packages/configobj.py\", line 1318, in _load\r\n    raise error\r\nconfigobj.ConfigObjError: Parsing failed with several errors.\r\nFirst error at line 43.\r\n```\r\nThere is a seven year old mailing list thread about it on [sourceforge](http://sourceforge.net/p/configobj/mailman/message/18644998/).\r\nI assume nobody ever took the time to actually implement it."},"comment":{"url":"https://api.github.com/repos/dbcli/mycli/issues/comments/142773626","html_url":"https://github.com/dbcli/mycli/issues/155#issuecomment-142773626","issue_url":"https://api.github.com/repos/dbcli/mycli/issues/155","id":142773626,"user":{"login":"tsroten","id":3047055,"avatar_url":"https://avatars.githubusercontent.com/u/3047055?v=3","gravatar_id":"","url":"https://api.github.com/users/tsroten","html_url":"https://github.com/tsroten","followers_url":"https://api.github.com/users/tsroten/followers","following_url":"https://api.github.com/users/tsroten/following{/other_user}","gists_url":"https://api.github.com/users/tsroten/gists{/gist_id}","starred_url":"https://api.github.com/users/tsroten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsroten/subscriptions","organizations_url":"https://api.github.com/users/tsroten/orgs","repos_url":"https://api.github.com/users/tsroten/repos","events_url":"https://api.github.com/users/tsroten/events{/privacy}","received_events_url":"https://api.github.com/users/tsroten/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T01:03:23Z","updated_at":"2015-09-24T01:03:23Z","body":"@amjith Sure. Loosening up the pymysql version dependency would be nice. I'll work on it."}}