Skip to content

Cannot import six.moves.urllib with bpython #874

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

Closed
michel-slm opened this issue Jan 9, 2021 · 3 comments
Closed

Cannot import six.moves.urllib with bpython #874

michel-slm opened this issue Jan 9, 2021 · 3 comments
Labels
Milestone

Comments

@michel-slm
Copy link

Fedora bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1782782

Tried on Fedora 33 with both bpython installed from RPM and in a venv (on Python 3.9.0). The same operations work fine using /usr/bin/python3 and IPython.

~ 
❯ bpython
bpython version unknown on top of Python 3.9.0 /usr/bin/python3
>>> from fedora import client
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    from fedora import client
  File "/usr/lib/python3.9/site-packages/fedora/client/__init__.py", line 157, in <module>
    from fedora.client.proxyclient import ProxyClient
  File "/usr/lib/python3.9/site-packages/fedora/client/proxyclient.py", line 39, in <module>
    from six.moves.urllib.parse import quote, urljoin, urlparse
ModuleNotFoundError: No module named 'six.moves.urllib'
>>> import six
>>> from six.moves import urllib
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    from six.moves import urllib
  File "/usr/lib/python3.9/site-packages/six.py", line 92, in __get__
    result = self._resolve()
  File "/usr/lib/python3.9/site-packages/six.py", line 115, in _resolve
    return _import_module(self.mod)
  File "/usr/lib/python3.9/site-packages/six.py", line 82, in _import_module
    __import__(name)
ModuleNotFoundError: No module named 'six.moves.urllib'
>>> from bodhi import client
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    from bodhi import client
  File "/usr/lib/python3.9/site-packages/bodhi/client/__init__.py", line 30, in <module>
    from fedora.client import AuthError, openidproxyclient
  File "/usr/lib/python3.9/site-packages/fedora/client/__init__.py", line 157, in <module>
    from fedora.client.proxyclient import ProxyClient
  File "/usr/lib/python3.9/site-packages/fedora/client/proxyclient.py", line 39, in <module>
    from six.moves.urllib.parse import quote, urljoin, urlparse
ModuleNotFoundError: No module named 'six.moves.urllib'
>>> 
@sebastinas
Copy link
Contributor

I'm unable to reproduce the issue with bpython 0.20, current git master and six versions 1.11 and 1.15. Could you please provide more details on the versions you tried?

@michel-slm
Copy link
Author

Sorry for the delay! Fedora is on bpython 0.20: https://bodhi.fedoraproject.org/updates/FEDORA-2020-a48d4fa5f4 is the version I tried and this is the corresponding build definition: https://src.fedoraproject.org/rpms/bpython/tree/0969da351f74b0a60676afda07e7a967d926384a

I can try uninstalling bpython completely, then trying installing specifically version 0.20 in a virtual environment; if it reproduces again could it be something unexpected about Fedora's Python installation?

@sebastinas
Copy link
Contributor

The issue is bpython.curtsiesfrontend.repl.ImportFinder when watchdog is installed.

@sebastinas sebastinas added this to the release-0.21 milestone Jan 16, 2021
@sebastinas sebastinas added the bug label Jan 16, 2021
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