Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when writing "yield" #65

Closed
rockneurotiko opened this issue Nov 18, 2014 · 2 comments
Closed

Error when writing "yield" #65

rockneurotiko opened this issue Nov 18, 2014 · 2 comments

Comments

@rockneurotiko
Copy link

I don't know if it's only me...

I've downloaded and installed from sources, I run ptipython, and start writing "yield", at the same time that I write the last character, I get that error:

In [1]: yieldException in thread Thread-7:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 921, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.4/threading.py", line 869, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.4/site-packages/prompt_toolkit-0.22-py3.4.egg/prompt_toolkit/__init__.py", line 400, in run                                                     
    completions = list(line.completer.get_completions(document))
  File "/usr/lib/python3.4/site-packages/prompt_toolkit-0.22-py3.4.egg/prompt_toolkit/contrib/ipython.py", line 69, in get_completions
    for c in super(IPythonCompleter, self).get_completions(document):
  File "/usr/lib/python3.4/site-packages/prompt_toolkit-0.22-py3.4.egg/prompt_toolkit/contrib/python_input.py", line 477, in get_completions
    script = get_jedi_script_from_document(document, self.get_locals(), self.get_globals())
  File "/usr/lib/python3.4/site-packages/prompt_toolkit-0.22-py3.4.egg/prompt_toolkit/contrib/python_input.py", line 457, in get_jedi_script_from_document
    namespaces=[locals, globals])
  File "/usr/lib/python3.4/site-packages/jedi-0.8.1_final0-py3.4.egg/jedi/api/__init__.py", line 642, in __init__
    interpreter.create(self._evaluator, namespaces[0], self._parser.module())
  File "/usr/lib/python3.4/site-packages/jedi-0.8.1_final0-py3.4.egg/jedi/api/interpreter.py", line 108, in create
    something.parent = ns
AttributeError: 'NoneType' object has no attribute 'parent'

Exception in thread Thread-8:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 921, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.4/threading.py", line 869, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.4/site-packages/prompt_toolkit-0.22-py3.4.egg/prompt_toolkit/contrib/python_input.py", line 579, in run
    script = get_jedi_script_from_document(document, self.get_locals(), self.get_globals())
  File "/usr/lib/python3.4/site-packages/prompt_toolkit-0.22-py3.4.egg/prompt_toolkit/contrib/python_input.py", line 457, in get_jedi_script_from_document
    namespaces=[locals, globals])
  File "/usr/lib/python3.4/site-packages/jedi-0.8.1_final0-py3.4.egg/jedi/api/__init__.py", line 642, in __init__
    interpreter.create(self._evaluator, namespaces[0], self._parser.module())
  File "/usr/lib/python3.4/site-packages/jedi-0.8.1_final0-py3.4.egg/jedi/api/interpreter.py", line 108, in create
    something.parent = ns
AttributeError: 'NoneType' object has no attribute 'parent'
@jonathanslenders
Copy link
Member

You're right. Thanks for reporting this bug! I'll write a patch asap. (It's a bug in Jedi, I'll report it there and write a workaround.)

@jonathanslenders
Copy link
Member

The patch should fix it: 33a5872

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants