Title: Guard against jedi completion errors better · Issue #483 · bpython/bpython · GitHub
Open Graph Title: Guard against jedi completion errors better · Issue #483 · bpython/bpython
X Title: Guard against jedi completion errors better · Issue #483 · bpython/bpython
Description: bpython version 0.15.dev4 on top of Python 2.7.9 /Users/tomb/.virtualenvs/bpython/bin/python2.7 >>> >>> >>> >>> >>> class Foo(): ... return x + 1 Traceback (most recent call last): File "/Users/tomb/.virtualenvs/bpython/bin/bpython", lin...
Open Graph Description: bpython version 0.15.dev4 on top of Python 2.7.9 /Users/tomb/.virtualenvs/bpython/bin/python2.7 >>> >>> >>> >>> >>> class Foo(): ... return x + 1 Traceback (most recent call last): File "/Users/tom...
X Description: bpython version 0.15.dev4 on top of Python 2.7.9 /Users/tomb/.virtualenvs/bpython/bin/python2.7 >>> >>> >>> >>> >>> class Foo(): ... return x + 1 Traceb...
Opengraph URL: https://github.com/bpython/bpython/issues/483
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Guard against jedi completion errors better","articleBody":"```\nbpython version 0.15.dev4 on top of Python 2.7.9 /Users/tomb/.virtualenvs/bpython/bin/python2.7\n\u003e\u003e\u003e\n\u003e\u003e\u003e\n\u003e\u003e\u003e\n\u003e\u003e\u003e\n\u003e\u003e\u003e class Foo():\n... return x + 1\nTraceback (most recent call last):\n File \"/Users/tomb/.virtualenvs/bpython/bin/bpython\", line 9, in \u003cmodule\u003e\n load_entry_point('bpython==0.15.dev4', 'console_scripts', 'bpython')()\n File \"/Users/tomb/Dropbox/code/bpython/bpython/curtsies.py\", line 79, in main\n interactive=(not exec_args))\n File \"/Users/tomb/Dropbox/code/bpython/bpython/curtsies.py\", line 177, in mainloop\n process_event(e)\n File \"/Users/tomb/Dropbox/code/bpython/bpython/curtsies.py\", line 135, in process_event\n repl.process_event(e)\n File \"/Users/tomb/Dropbox/code/bpython/bpython/curtsiesfrontend/repl.py\", line 487, in process_event\n return self.process_key_event(e)\n File \"/Users/tomb/Dropbox/code/bpython/bpython/curtsiesfrontend/repl.py\", line 563, in process_key_event\n self.cursor_offset = len(self.current_line)\n File \"/Users/tomb/Dropbox/code/bpython/bpython/curtsiesfrontend/repl.py\", line 1344, in _set_cursor_offset\n self.update_completion()\n File \"/Users/tomb/Dropbox/code/bpython/bpython/curtsiesfrontend/repl.py\", line 877, in update_completion\n self.list_win_visible = BpythonRepl.complete(self, tab)\n File \"/Users/tomb/Dropbox/code/bpython/bpython/repl.py\", line 606, in complete\n history=self.history)\n File \"/Users/tomb/Dropbox/code/bpython/bpython/autocomplete.py\", line 455, in get_completer_bpython\n return get_completer(BPYTHON_COMPLETER, cursor_offset, line, **kwargs)\n File \"/Users/tomb/Dropbox/code/bpython/bpython/autocomplete.py\", line 434, in get_completer\n cursor_offset, line, **kwargs)\n File \"/Users/tomb/Dropbox/code/bpython/bpython/autocomplete.py\", line 409, in matches\n history=history)\n File \"/Users/tomb/Dropbox/code/bpython/bpython/autocomplete.py\", line 369, in matches\n completions = script.completions()\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/api/__init__.py\", line 155, in completions\n user_stmt = self._parser.user_stmt_with_whitespace()\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/cache.py\", line 139, in wrapper\n result = func(self)\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/parser/user_context.py\", line 226, in user_stmt_with_whitespace\n user_stmt = self.user_stmt()\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/cache.py\", line 139, in wrapper\n result = func(self)\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/parser/user_context.py\", line 216, in user_stmt\n module = self.module()\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/parser/user_context.py\", line 255, in module\n return self._parser().module\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/cache.py\", line 139, in wrapper\n result = func(self)\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/parser/user_context.py\", line 209, in _parser\n parser = FastParser(self._source, self._path)\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/parser/fast.py\", line 65, in __call__\n p = super(CachedFastParser, self).__call__(source, module_path)\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/parser/fast.py\", line 199, in __init__\n self._parse(code)\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/parser/fast.py\", line 302, in _parse\n line_offset, nodes, not is_first)\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/parser/fast.py\", line 367, in _get_parser\n top_module=self.module, no_docstr=no_docstr)\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/parser/__init__.py\", line 59, in __init__\n self._parse()\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/parser/__init__.py\", line 567, in _parse\n func.statements.append(pr.KeywordStatement(tok_str, s,\n File \"/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/jedi/parser/fast.py\", line 38, in __getattr__\n return getattr(self.parsers[0].module, name)\nIndexError: list index out of range\n```\n","author":{"url":"https://github.com/thomasballinger","@type":"Person","name":"thomasballinger"},"datePublished":"2015-02-17T19:58:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/483/bpython/issues/483"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ed9e77a0-3145-68ac-f9bb-1aa5e45627b5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B472:31EA40:2DC56E:3D34EB:6969D3F3 |
| html-safe-nonce | 235558a1e44355ec28e0c682a48c13e8ba6d4c3cfb3b56bad123c76dda3f3daa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDcyOjMxRUE0MDoyREM1NkU6M0QzNEVCOjY5NjlEM0YzIiwidmlzaXRvcl9pZCI6IjcxMDk5NjU0NDcxMjg3OTgxOTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1c459799bdef2fba735ffd6fa3808852ffa5fff4ebb87643572d8039db2fef31 |
| hovercard-subject-tag | issue:57973483 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bpython/bpython/483/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c07c2883692aeb4eb3dd37f113ff01b9bef1413d133892825dd1ad785a7efffb/bpython/bpython/issues/483 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c07c2883692aeb4eb3dd37f113ff01b9bef1413d133892825dd1ad785a7efffb/bpython/bpython/issues/483 |
| og:image:alt | bpython version 0.15.dev4 on top of Python 2.7.9 /Users/tomb/.virtualenvs/bpython/bin/python2.7 >>> >>> >>> >>> >>> class Foo(): ... return x + 1 Traceback (most recent call last): File "/Users/tom... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | thomasballinger |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| turbo-cache-control | no-preview |
| go-import | github.com/bpython/bpython git https://github.com/bpython/bpython.git |
| octolytics-dimension-user_id | 8071396 |
| octolytics-dimension-user_login | bpython |
| octolytics-dimension-repository_id | 21508865 |
| octolytics-dimension-repository_nwo | bpython/bpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21508865 |
| octolytics-dimension-repository_network_root_nwo | bpython/bpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width