{"action":"created","issue":{"url":"https://api.github.com/repos/jbwhit/data-science-teams/issues/2","repository_url":"https://api.github.com/repos/jbwhit/data-science-teams","labels_url":"https://api.github.com/repos/jbwhit/data-science-teams/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/jbwhit/data-science-teams/issues/2/comments","events_url":"https://api.github.com/repos/jbwhit/data-science-teams/issues/2/events","html_url":"https://github.com/jbwhit/data-science-teams/issues/2","id":195639875,"number":2,"title":"SQL notebook has issues in 64 bit invornment.","user":{"login":"Tom-Niesytto","id":20327588,"avatar_url":"https://avatars.githubusercontent.com/u/20327588?v=3","gravatar_id":"","url":"https://api.github.com/users/Tom-Niesytto","html_url":"https://github.com/Tom-Niesytto","followers_url":"https://api.github.com/users/Tom-Niesytto/followers","following_url":"https://api.github.com/users/Tom-Niesytto/following{/other_user}","gists_url":"https://api.github.com/users/Tom-Niesytto/gists{/gist_id}","starred_url":"https://api.github.com/users/Tom-Niesytto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tom-Niesytto/subscriptions","organizations_url":"https://api.github.com/users/Tom-Niesytto/orgs","repos_url":"https://api.github.com/users/Tom-Niesytto/repos","events_url":"https://api.github.com/users/Tom-Niesytto/events{/privacy}","received_events_url":"https://api.github.com/users/Tom-Niesytto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-14T20:39:50Z","updated_at":"2016-12-15T05:29:08Z","closed_at":null,"body":"I tried 32 bit Anaconda first and it worked OK until I tried creating jupyter_r environment then test R notebook. But SQL notebook worked. So I switched to 64 bit Anaconda (installing it from Miniconda) and now SQL notebook is broken:\r\n%%sql sqlite://\r\nCREATE TABLE presidents (first_name, last_name, year_of_birth);\r\nINSERT INTO presidents VALUES ('George', 'Washington', 1732);\r\nINSERT INTO presidents VALUES ('John', 'Adams', 1735);\r\nINSERT INTO presidents VALUES ('Thomas', 'Jefferson', 1743);\r\nINSERT INTO presidents VALUES ('James', 'Madison', 1751);\r\nINSERT INTO presidents VALUES ('James', 'Monroe', 1758);\r\nINSERT INTO presidents VALUES ('Zachary', 'Taylor', 1784);\r\nINSERT INTO presidents VALUES ('Abraham', 'Lincoln', 1809);\r\nINSERT INTO presidents VALUES ('Theodore', 'Roosevelt', 1858);\r\nINSERT INTO presidents VALUES ('Richard', 'Nixon', 1913);\r\nINSERT INTO presidents VALUES ('Barack', 'Obama', 1961);\r\ngives:\r\nDone.\r\n1 rows affected.\r\n1 rows affected.\r\n1 rows affected.\r\n1 rows affected.\r\n1 rows affected.\r\n1 rows affected.\r\n1 rows affected.\r\n1 rows affected.\r\n1 rows affected.\r\n1 rows affected.\r\n\r\n---------------------------------------------------------------------------\r\nValueError                                Traceback (most recent call last)\r\n<ipython-input-4-bfef7b50f9b0> in <module>()\r\n----> 1 get_ipython().run_cell_magic(u'sql', u'sqlite://', u\"CREATE TABLE presidents (first_name, last_name, year_of_birth);\\nINSERT INTO presidents VALUES ('George', 'Washington', 1732);\\nINSERT INTO presidents VALUES ('John', 'Adams', 1735);\\nINSERT INTO presidents VALUES ('Thomas', 'Jefferson', 1743);\\nINSERT INTO presidents VALUES ('James', 'Madison', 1751);\\nINSERT INTO presidents VALUES ('James', 'Monroe', 1758);\\nINSERT INTO presidents VALUES ('Zachary', 'Taylor', 1784);\\nINSERT INTO presidents VALUES ('Abraham', 'Lincoln', 1809);\\nINSERT INTO presidents VALUES ('Theodore', 'Roosevelt', 1858);\\nINSERT INTO presidents VALUES ('Richard', 'Nixon', 1913);\\nINSERT INTO presidents VALUES ('Barack', 'Obama', 1961);\")\r\n\r\nC:\\Users\\IBM_ADMIN\\Miniconda2\\lib\\site-packages\\IPython\\core\\interactiveshell.pyc in run_cell_magic(self, magic_name, line, cell)\r\n   2113             magic_arg_s = self.var_expand(line, stack_depth)\r\n   2114             with self.builtin_trap:\r\n-> 2115                 result = fn(magic_arg_s, cell)\r\n   2116             return result\r\n   2117 \r\n\r\n<decorator-gen-124> in execute(self, line, cell, local_ns)\r\n\r\nC:\\Users\\IBM_ADMIN\\Miniconda2\\lib\\site-packages\\IPython\\core\\magic.pyc in <lambda>(f, *a, **k)\r\n    186     # but it's overkill for just that one bit of state.\r\n    187     def magic_deco(arg):\r\n--> 188         call = lambda f, *a, **k: f(*a, **k)\r\n    189 \r\n    190         if callable(arg):\r\n\r\n<decorator-gen-123> in execute(self, line, cell, local_ns)\r\n\r\nC:\\Users\\IBM_ADMIN\\Miniconda2\\lib\\site-packages\\IPython\\core\\magic.pyc in <lambda>(f, *a, **k)\r\n    186     # but it's overkill for just that one bit of state.\r\n    187     def magic_deco(arg):\r\n--> 188         call = lambda f, *a, **k: f(*a, **k)\r\n    189 \r\n    190         if callable(arg):\r\n\r\nC:\\Users\\IBM_ADMIN\\Miniconda2\\lib\\site-packages\\sql\\magic.pyc in execute(self, line, cell, local_ns)\r\n     87             result = sql.run.run(conn, parsed['sql'], self, user_ns)\r\n     88 \r\n---> 89             if result and ~isinstance(result, str) and self.column_local_vars:\r\n     90                 #Instead of returning values, set variables directly in the\r\n     91                 #users namespace. Variable names given by column names\r\n\r\nC:\\Users\\IBM_ADMIN\\Miniconda2\\lib\\site-packages\\pandas\\core\\generic.pyc in __nonzero__(self)\r\n    890         raise ValueError(\"The truth value of a {0} is ambiguous. \"\r\n    891                          \"Use a.empty, a.bool(), a.item(), a.any() or a.all().\"\r\n--> 892                          .format(self.__class__.__name__))\r\n    893 \r\n    894     __bool__ = __nonzero__\r\n\r\nValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().\r\n\r\nAnd similar for the rest of the notebook:\r\nNameError: name 'later_presidents' is not defined>\r\n\r\nFor the reference I installed ipython-sql as suggested:\r\nc:\\econfig\\UserData\\Safari\\jupyter-data-science-teams>conda search ipython-sql\r\nFetching package metadata .........\r\n\r\nc:\\econfig\\UserData\\Safari\\jupyter-data-science-teams>pip install ipython-sql\r\nCollecting ipython-sql\r\n  Downloading ipython-sql-0.3.8.tar.gz\r\nCollecting prettytable (from ipython-sql)\r\n  Downloading prettytable-0.7.2.zip\r\nRequirement already satisfied (use --upgrade to upgrade): ipython>=1.0 in c:\\users\\ibm_admin\\miniconda2\\lib\\site-packages (from ipython-sql)\r\nRequirement already satisfied (use --upgrade to upgrade): sqlalchemy>=0.6.7 in c:\\users\\ibm_admin\\miniconda2\\lib\\site-packages (from ipython-sql)\r\nCollecting sqlparse (from ipython-sql)\r\n  Downloading sqlparse-0.2.2-py2.py3-none-any.whl\r\nRequirement already satisfied (use --upgrade to upgrade): six in c:\\users\\ibm_admin\\miniconda2\\lib\\site-packages (from ipython-sql)\r\nRequirement already satisfied (use --upgrade to upgrade): ipython-genutils>=0.1.0 in c:\\users\\ibm_admin\\miniconda2\\lib\\site-packages (from ipython-sql)\r\nBuilding wheels for collected packages: ipython-sql, prettytable\r\n  Running setup.py bdist_wheel for ipython-sql ... done\r\n  Stored in directory: C:\\Users\\IBM_ADMIN\\AppData\\Local\\pip\\Cache\\wheels\\98\\e3\\5f\\78dcb15c0532616bb007d42a6086d9b499c3b4728b29596936\r\n  Running setup.py bdist_wheel for prettytable ... done\r\n  Stored in directory: C:\\Users\\IBM_ADMIN\\AppData\\Local\\pip\\Cache\\wheels\\b6\\90\\7b\\1c22b89217d0eba6d5f406e562365ebee804f0d4595b2bdbcd\r\nSuccessfully built ipython-sql prettytable\r\nInstalling collected packages: prettytable, sqlparse, ipython-sql\r\nSuccessfully installed ipython-sql-0.3.8 prettytable-0.7.2 sqlparse-0.2.2\r\nYou are using pip version 8.1.2, however version 9.0.1 is available.\r\nYou should consider upgrading via the 'python -m pip install --upgrade pip' command.\r\n"},"comment":{"url":"https://api.github.com/repos/jbwhit/data-science-teams/issues/comments/267242520","html_url":"https://github.com/jbwhit/data-science-teams/issues/2#issuecomment-267242520","issue_url":"https://api.github.com/repos/jbwhit/data-science-teams/issues/2","id":267242520,"user":{"login":"jbwhit","id":105829,"avatar_url":"https://avatars.githubusercontent.com/u/105829?v=3","gravatar_id":"","url":"https://api.github.com/users/jbwhit","html_url":"https://github.com/jbwhit","followers_url":"https://api.github.com/users/jbwhit/followers","following_url":"https://api.github.com/users/jbwhit/following{/other_user}","gists_url":"https://api.github.com/users/jbwhit/gists{/gist_id}","starred_url":"https://api.github.com/users/jbwhit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbwhit/subscriptions","organizations_url":"https://api.github.com/users/jbwhit/orgs","repos_url":"https://api.github.com/users/jbwhit/repos","events_url":"https://api.github.com/users/jbwhit/events{/privacy}","received_events_url":"https://api.github.com/users/jbwhit/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T05:29:08Z","updated_at":"2016-12-15T05:29:08Z","body":"This is a more confusing bug, but this falls squarely into the `https://github.com/catherinedevlin/ipython-sql` extension -- can you open an issue there? Feel free to leave this issue here and link back. "}}
{"actor":{"display_login":"jbwhit"}}