Skip to content
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

Folders with subfolders and submodules named the same cause import problem #734

Open
baschni opened this issue Mar 26, 2024 · 0 comments
Open

Comments

@baschni
Copy link

baschni commented Mar 26, 2024

Hello!

I have the following file structure in Pythonista:

Program A
-includes
--includes.py
-Program A.py

Program B
-includes
--includes.py
-Program B.py

Program A.py
from includes.includes import VARIABLE_A; print(VARIABLE_A)

includes.py in Program A-folder
VARIABLE_A="A"

Program B.py
from includes.includes import VARIABLE_B; print(VARIABLE_B)

includes.py in Program B-folder
VARIABLE_B="B"

Now when I run Program A first I get the output "A" as expected. When I then run Program B without restarting Pythonista I get the following error:
from includes.includes import VARIABLE_B ImportError: cannot import name 'VARIABLE_B' from 'includes.includes' (/private/var/mobile/Containers/Shared/AppGroup/F8EA7E25-9668-4A7B-882C-6A74E7C01FD7/Pythonista3/Documents/TestPythonistaIncludes/Program A/includes/includes.py)

I already tried deleting and reinstallting Pythonista, same behaviour.

Can you guys reproduce this? Is this a known bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant