Skip to content

Scripts failing to run with "No module named window_commands #546

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
SirGnip opened this issue Jan 3, 2020 · 2 comments
Closed

Scripts failing to run with "No module named window_commands #546

SirGnip opened this issue Jan 3, 2020 · 2 comments

Comments

@SirGnip
Copy link
Contributor

SirGnip commented Jan 3, 2020

Running a simple script with my arcade repo synced to 7111d49 is triggering ModuleNotFoundErrors:

$ cat test.py
import arcade
print(arcade.Sprite())

$ venv/Scripts/mypy test.py --strict
Success: no issues found in 1 source file

$ venv/Scripts/python test.py
Traceback (most recent call last):
  File "test.py", line 2, in <module>
    import arcade
  File "c:\repo\arcade\arcade\__init__.py", line 32, in <module>
    from window_commands import close_window
ModuleNotFoundError: No module named 'window_commands'

I did a quick tweak and tried adding arcade. to the beginning of the first window_commands imports in __init__.py to make it an absolute import path and reran test.py. It got further. Prefixing a . to make it an explicit relative import also allowed the script to get farther. Python 3 no longer supports "implicit relative imports".

I also just tried running a couple scripts from the examples/ directory in the arcade repo and got the same error.

@pvcraven
Copy link
Member

pvcraven commented Jan 4, 2020

Fixed some errors. Still a lot of errors when running unit tests.

@pvcraven
Copy link
Member

Fixed with 2.2.4.

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