question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError on cli.py

See original GitHub issue

Hi guys! I tried to run the newest cli update and I encountered the following issue:

python3.9  speakeasy/cli.py --help
    import multiprocessing as mp
  File "/usr/lib/python3.9/multiprocessing/__init__.py", line 16, in <module>
    from . import context
  File "/usr/lib/python3.9/multiprocessing/context.py", line 6, in <module>
    from . import reduction
  File "/usr/lib/python3.9/multiprocessing/reduction.py", line 15, in <module>
    import pickle
  File "/usr/lib/python3.9/pickle.py", line 33, in <module>
    from struct import pack, unpack
  File "/home/ossigeno/speakeasy/speakeasy/struct.py", line 3, in <module>
    import ctypes as ct
  File "/usr/lib/python3.9/ctypes/__init__.py", line 15, in <module>
    from struct import calcsize as _calcsize
ImportError: cannot import name 'calcsize' from partially initialized module 'struct' (most likely due to a circular import) 

I don’t know if the issue has to do with my local python environment or what, but I don’t think that having a file called struct, when there is already a module in the standard lib with the same name can be an issue.

Let me know if you can reproduce the bug or I can help in anyway!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jhsmithcommented, Oct 13, 2021

Great - glad that works for you. Closing this out - let us know if you encounter other issues.

0reactions
0ssigenocommented, Oct 13, 2021

Yeah, you are absolutely correct, it does work this way.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python import problem in command line mode - Stack Overflow
but when I try to run it from command line , import error ! importError: No module named Module3.pyClass. I am running from...
Read more >
Cannot import name 'cli' from 'streamlit'
Hi I am using stramlit in one of my project intrgrated with python. previouly it used to work. I created a new conda...
Read more >
no module named cli ? (when running any wdoc script)
this is the error i'm trying to run any wdoc script (exe, py, pyw, etc) i'm on windows python 2.5 i installed using...
Read more >
After mailman upgrade to mailman3, can't use CLI utilities ...
I solved it through persistence. Following what I document here, I now have the command-line tools working properly and Mailman is ...
Read more >
ImportError: dlopen(...). HELP! - Discussions on Python.org
Traceback (most recent call last): File "/Users/username/.local/bin/cci", line 5, in <module> from cumulusci.cli.cci import main File ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found