-
Notifications
You must be signed in to change notification settings - Fork 211
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
Cannot have a package named 'models' in project #110
Comments
This also happens with directory named "server". It seems pretty odd practice for a module init to futz with the system path... All the imports within fhirclient need to be self-relative except that fhir-parser has non-relative imports and so we'd have to fix that. Sigh. I think we're at the point of trial-and-error avoiding directory names. |
Guys if you come up with a fix for this it would be great, looking fwd for pull requests. |
I think the original hack with sys path was to support Python 2 and 3. You could consider finally dropping Python 2 and revamp all the imports. I remember those being a headache, see e.g. 7ee688a |
Yes dropping Python 2 could be the way to go, feel free to take this on |
See PR #134 |
I would like to have a directory/package called
models
within my project that uses this library. Sadly, this does not work.Check out this minimal example:
If I run
main.py
it gives the expected output:Now, I will import something from
fhirclient
inmain.py
:If I now run
main.py
I get the following error:I guess this is due to adding the directory
models
in fromfhirclient
tosys.path
in the parent__init__.py
file:The text was updated successfully, but these errors were encountered: