0

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.

Michael Butscher
  • 10,028
  • 4
  • 24
  • 25
Bar
  • 83
  • 9

1 Answers1

0

Actually I managed to get it work playing around in PyCharm. I marked src directory as Sources Root, and then went to File -> Invalidate Caches / Restart and then did Invalidate caches and restart and this worked. To be honest I have no idea why was this needed as it worked before.

Bar
  • 83
  • 9