Python 3.12.0 gives this error if code is run from IDLE.
If I run this from command line it works.
Same error with Pythons 3.9.5 and 3.10.0
Error printout:
(Traceback (most recent call last):
File "C:\WORK_PYTHON\scamp\scamp.py", line 1, in <module>
from scamp import *
File "C:\WORK_PYTHON\scamp\scamp.py", line 3, in <module>
s = Session()
NameError: name 'Session' is not defined)
Hi Eranh0 - are the parentheses that enclose the snippet in your actual code? Removing them works for me. That wouldn’t explain why the code works in other contexts though
I just noticed: you called the file scamp.py. That might be confusing the import mechanism. Try calling the file something else, and make sure there’s no file floating around called scamp.py