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

pybricksdev/compile.py: Add better error message #85

Merged
merged 1 commit into from
Jun 30, 2024

Conversation

dlech
Copy link
Member

@dlech dlech commented May 5, 2024

When compiling multi-file projects that contain a namespace pacakge (folder without init.py), we hit Python bug python/cpython#84530.

This adds a try/except block to catch the error and raise a more helpful error message.

Issue: pybricks/support#1602

When compiling multi-file projects that contain a namespace pacakge
(folder without __init__.py), we hit Python bug python/cpython#84530.

This adds a try/except block to catch the error and raise a more helpful
error message.

Issue: pybricks/support#1602
@dlech
Copy link
Member Author

dlech commented May 5, 2024

Since creating submodules this way is a bit of an advanced feature and there is a workaround for the Python bug, I'm inclined to just add this message and try to fix the bug in Python eventually. Despite this bug, the module finder is still probably better than anything we could come up with quickly.

@dlech dlech merged commit a1a8a56 into pybricks:master Jun 30, 2024
7 checks passed
@dlech dlech deleted the better-compile-error-message branch June 30, 2024 19:40
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

Successfully merging this pull request may close these issues.

1 participant