[Tutor] Issue with importing a module from the same directory

Alan Gauld alan.gauld at yahoo.co.uk
Thu Aug 6 04:11:02 EDT 2020


On 06/08/2020 04:43, Let's Play PC wrote:
> Hello, I am having issues importing a module from the same directory as
> where my project is located as python says it does not exist.

Specifics are always easier to answer.

Can you show us a minimal file that exhibits the problem along with a
listing of your file structure(just for the example files you used)

Also show us the full error message.

> PyCharm and my project structure makes a direct path to a folder containing
> these files (embedded in another folder). Any thoughts on how I can resolve
> the issue? Thanks in advance.

None of that sounds unusual, but maybe we can spot something
if you send the above details.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list