Open JacobenVosloo opened 1 month ago
@JacobenVosloo , could you please provide the contents of the main.assembled.py
file (it should be in the same folder as your main.py
file)?
@PeterStaev, thank you for the quick response.
The contents are the same as the main.py file.
# LEGO type:basic slot:0 autostart
# Use wildcard import for utilities
from utilities.py import *
# Now you can call battery_check directly
battery_check()
And the file is located in the same location as main.py and utilities.py
@JacobenVosloo I see your import in the assembled file looks different than the one in the main.py
file - it hast the .py
extension at the end of utilities. I think this is what causing the problems as the logic automatically adds the extension when it looks up the file to be assembled. Can you check and remove the extension so the import is:
from utilities import *
@PeterStaev
I double-checked, and import is now as you suggested. But it is still not working. Here is a screenshot showing the whole setup and the resultant main. assembled.py file.
I am working of a Mac, could this be the problem?
Is there perhaps some example file that I can use to test the setup on my side.
Thank you again for the support and a great library
Based on this PR https://github.com/PeterStaev/lego-spikeprime-mindstorms-vscode/pull/58
And the read me
I would assume that splitting code into multiple files work
But based on my simple test it does not
Can anyone please assist as to what am I doing wrong? @GreenGitHub99
I also tried changing the settings to precompiled mpy file