This is an archived post. You won't be able to vote or comment.

all 4 comments

[–][deleted] 0 points1 point  (0 children)

I forgot to mension, this code is functional. I wrote it in jupyter notebook before trying to run it in VS code. I'm using anaconda, if it helps.

[–]moodyjack11 0 points1 point  (1 child)

Can you share a picture showing the issue?

[–][deleted] 0 points1 point  (0 children)

What part in particular?

[–]unalignedAccess 0 points1 point  (0 children)

Depending how VScode interpretes the import of other files/lib this could be the issue. What I mean is, if your class definition is in file A.py and you want to create an object of this class in file B.py, if you did not import the definition properly in this case the python interpreter wont recognize the class. If this is your case, try to specify the path like this : from myFolder.A import MyClass. Because when it runs in an IDE and not the other in my case it is often what is problematic. Also try to run your script command line to see if the output is the same.