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
![No description](https://cdn.answeroverflow.com/1164270990465974342/image.png)
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
![No description](https://cdn.answeroverflow.com/1164273288013430885/rn_image_picker_lib_temp_013a98c3-cfa2-492b-b7e3-05f35590ce16.jpg)
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 😉