Skip to main content
Post Closed as "Duplicate" by bad_coder, eyllanesc python
edited tags
Link
Michael Butscher
  • 11k
  • 4
  • 28
  • 28

This is how my project looks:

src/ data_readers/   - __init__.py   - d2d_releases_reader.py main/ d2d_interactions/   - __init__.py   - d2d_interactions_predictions.py 

andAnd from the d2d_interactions_predictions.pyd2d_interactions_predictions.py file I'm trying to import the class d2d_releases_readerd2d_releases_reader inside the file d2d_releases_reader.py usingd2d_releases_reader.py using the following:

from src.data_readers.d2d_releases_reader import d2d_releases_reader 

It used to work but it just stopped randomly, I've no idea what happened and I'm trying to understand using other posts in stack oveflowStack Overflow and I can't get it to work using any solution already proposed.

This is how my project looks:

src/ data_readers/   - __init__.py   - d2d_releases_reader.py main/ d2d_interactions/   - __init__.py   - d2d_interactions_predictions.py 

and from the d2d_interactions_predictions.py file I'm trying to import the class d2d_releases_reader inside the file d2d_releases_reader.py using the following:

from src.data_readers.d2d_releases_reader import d2d_releases_reader 

It used to work but it just stopped randomly, I've no idea what happened and I'm trying to understand using other posts in stack oveflow and I can't get it to work using any solution already proposed.

This is how my project looks:

src/ data_readers/ - __init__.py - d2d_releases_reader.py main/ d2d_interactions/ - __init__.py - d2d_interactions_predictions.py 

And from the d2d_interactions_predictions.py file I'm trying to import the class d2d_releases_reader inside the file d2d_releases_reader.py using the following:

from src.data_readers.d2d_releases_reader import d2d_releases_reader 

It used to work but it just stopped randomly, I've no idea what happened and I'm trying to understand using other posts in Stack Overflow and I can't get it to work using any solution already proposed.

Source Link
Bar
  • 83
  • 10

Problem with importing python classes from different folders

This is how my project looks:

src/ data_readers/ - __init__.py - d2d_releases_reader.py main/ d2d_interactions/ - __init__.py - d2d_interactions_predictions.py 

and from the d2d_interactions_predictions.py file I'm trying to import the class d2d_releases_reader inside the file d2d_releases_reader.py using the following:

from src.data_readers.d2d_releases_reader import d2d_releases_reader 

It used to work but it just stopped randomly, I've no idea what happened and I'm trying to understand using other posts in stack oveflow and I can't get it to work using any solution already proposed.