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

ModuleNotFoundError: No module named 'imp' #232

Open
SanderWegter opened this issue Nov 3, 2023 · 2 comments
Open

ModuleNotFoundError: No module named 'imp' #232

SanderWegter opened this issue Nov 3, 2023 · 2 comments

Comments

@SanderWegter
Copy link

Hi,

I've tried to use Exscript with python 3.12 but unfortunately it seems that the imp module was dropped, see python/cpython#98040

Python 3.12.0 (main, Oct  5 2023, 12:40:12) [Clang 15.0.0 (clang-1500.0.40.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Exscript
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/dev/test_app/.venv/lib/python3.12/site-packages/Exscript/__init__.py", line 34, in <module>
    from .queue import Queue
  File "/Users/dev/test_app/.venv/lib/python3.12/site-packages/Exscript/queue.py", line 40, in <module>
    from .util.decorator import get_label
  File "/Users/dev/test_app/.venv/lib/python3.12/site-packages/Exscript/util/decorator.py", line 28, in <module>
    from ..protocols.exception import LoginFailure
  File "/Users/dev/test_app/.venv/lib/python3.12/site-packages/Exscript/protocols/__init__.py", line 26, in <module>
    from ..util.url import Url
  File "/Users/dev/test_app/.venv/lib/python3.12/site-packages/Exscript/util/url.py", line 27, in <module>
    from future import standard_library
  File "/Users/dev/test_app/.venv/lib/python3.12/site-packages/future/standard_library/__init__.py", line 65, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'
$ pip freeze                                                                                                                                      ─╯
Exscript==2.6.28
@oduvan
Copy link

oduvan commented Feb 17, 2024

same :(

@oduvan
Copy link

oduvan commented Feb 17, 2024

looks like the fix for that is to put

from future import standard_library
standard_library.install_aliases()

under condition

if sys.version_info[0] ==2:

or something like that

oduvan added a commit to oduvan/exscript that referenced this issue Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants