Cannot import Top level packages
Hi, I was trying to import a top level package, using built package, and without building but using filenames, but am not able to use it. I am sure as hell that I was able to do something like this in v0.3.x
Is this the expected behaviour, or something changed or am I missing something?
Let me know if you find out what's missing
12 Replies
This import is incorrect. In structures, there is no such a file: "PriorityQueue"
Hi, there is a class named PriorityQueue in Heap.py
And I've imported this class in
__init__.py
My apologies for incomplete informationYou should better show your package structure 😉 Screen is not enough
Here
Interesting. I'll try it myself
Sure let me know if you manage to import classes from files in the same directory
For me, it worked. Try to execute. Maybe there is a problem with plugin in VSCode, not with compiler itself
Congrats @gryznar, you just advanced to level 6!
Wait. priority_queue.mojo is inside structures or outside?
Anyway, try to run code, ignoring this squiggles
Inside the tests folder
Completely seperate
Have you tried that? 🙂
I've seen bug report. The best solution here. 🙂 I have found another crash during playing with imports 😉