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

__import__() argument 1 must be string, not None #492

Closed
jonathanslenders opened this issue Oct 3, 2014 · 1 comment
Closed

__import__() argument 1 must be string, not None #492

jonathanslenders opened this issue Oct 3, 2014 · 1 comment
Labels

Comments

@jonathanslenders
Copy link

jedi.Interpreter('a(', column=2, line=1, path='', namespaces=[{'a': lambda:None}]).call_signatures()

This raises:

  File "/home/jonathan/env/mobilevikings/local/lib/python2.7/site-packages/jedi/api/__init__.py", line 574, in call_signatures
    self._pos, user_stmt)
  File "/home/jonathan/env/mobilevikings/local/lib/python2.7/site-packages/jedi/cache.py", line 90, in wrapper
    value = optional_callable()
  File "/home/jonathan/env/mobilevikings/local/lib/python2.7/site-packages/jedi/api/__init__.py", line 572, in <lambda>
    _callable = lambda: self._evaluator.eval_call(stmt_el)
  File "/home/jonathan/env/mobilevikings/local/lib/python2.7/site-packages/jedi/evaluate/__init__.py", line 226, in eval_call
    return self.eval_call_path(path, par, s.start_pos)
  File "/home/jonathan/env/mobilevikings/local/lib/python2.7/site-packages/jedi/evaluate/__init__.py", line 240, in eval_call_path
    search_global=True)
  File "/home/jonathan/env/mobilevikings/local/lib/python2.7/site-packages/jedi/evaluate/__init__.py", line 113, in find_types
    return f.find(scopes, resolve_decorator, search_global)
  File "/home/jonathan/env/mobilevikings/local/lib/python2.7/site-packages/jedi/debug.py", line 51, in wrapper
    result = func(*args, **kwargs)
  File "/home/jonathan/env/mobilevikings/local/lib/python2.7/site-packages/jedi/evaluate/finder.py", line 46, in find
    names = self.filter_name(scopes)
  File "/home/jonathan/env/mobilevikings/local/lib/python2.7/site-packages/jedi/evaluate/finder.py", line 89, in filter_name
    scope = name.parent.parent
  File "/home/jonathan/env/mobilevikings/local/lib/python2.7/site-packages/jedi/cache.py", line 139, in wrapper
    result = func(self)
  File "/home/jonathan/env/mobilevikings/local/lib/python2.7/site-packages/jedi/api/interpreter.py", line 69, in parent
    module = __import__(module_name)
TypeError: __import__() argument 1 must be string, not None
@davidhalter davidhalter added the bug label Oct 4, 2014
@davidhalter
Copy link
Owner

Latest Jedi commit:

>>> jedi.Interpreter('a(', column=2, line=1, path='', namespaces=[{'a': lambda:None}]).call_signatures()
[<CallSignature: function index 0>]

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

No branches or pull requests

2 participants