Reputation: 4188
My folder structure:
webservices.py
starts like this:
from flask import Flask, request
from werkzeug.utils import secure_filename
from backend.csv_utilities import *
import os
webservices.py
on MAC, I won't have any problems.webservices.py
on Windows, I will get a module not found error.Changing webservices.py
like this:
from flask import Flask, request
from werkzeug.utils import secure_filename
from csv_utilities import *
import os
works on both; MAC and Windows. But in PyCharm (on MAC, I didn't try on Windows) now I get an error marked on csv_utilities
and it says: unresolved reference 'csv_utilities'.
Why is this error there? I can run it without problems. Is it a Pycharm issue or am I doing something not in the right way?
Upvotes: 1
Views: 260
Reputation: 698
I had a similar issue once. Try Mark directory as Sources Root option on your backend folder. It worked for me.
Upvotes: 2