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

missing __init__.py file for a module #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kvbik
Copy link

@kvbik kvbik commented Oct 12, 2022

No description provided.

Copy link
Member

@rixx rixx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where have you run into problems without this file? Most or all of the currently running pretalx plugins seem to work fine without it.

@kvbik
Copy link
Author

kvbik commented Oct 12, 2022

I run into the problem while debugging one plugin. Take pretalx-downstream [1] as an example. The plugin works, because there is some internal import magic. Though import pretalx_downstream fails. And so would any other absolut imports. I think this can cause some unnecessary confusion.

[1] https://pypi.org/project/pretalx-downstream/

PS: In the pretix plugin cookiecutter [2] this is a non issue, because the apps.py logic is in the __init__.py - which I am not saying you have to follow :)

[2] https://github.com/pretix/pretix-plugin-cookiecutter/

@rixx
Copy link
Member

rixx commented Oct 12, 2022

Hm, yes, let's talk about pretalx-downstream:

In [1]: import pretalx_downstream

In [2]: type(pretalx_downstream)
Out[2]: module

What is the exact import error you are seeing? Which Python version is this on?

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.

2 participants