Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading gcodes.txt fails from different directory #24

Closed
dzhang97 opened this issue Nov 29, 2020 · 3 comments
Closed

Loading gcodes.txt fails from different directory #24

dzhang97 opened this issue Nov 29, 2020 · 3 comments

Comments

@dzhang97
Copy link

Attempting to load the gcodes.txt file will crash smoopi when main.py is called from a different directory. Looks like it needs app dir awareness like loading smoothiehost.ini.

I have been starting smoopi by running /usr/bin/python3 ~/smoopi/main.py, since I have been using a desktop shortcut. Running python3 main.py from the smoopi directory load the gcodes.txt file no problem.

@dzhang97 dzhang97 changed the title Loading gcodes.txt fails Loading gcodes.txt fails from different directory Nov 29, 2020
@wolfmanjm
Copy link
Owner

Smoopi MUST be run from the smoopi directory. This is easy to do.
There is not just gcodes.txt but also several other files that it needs to read like macros.ini and any modules.
It won't crash now if gcodes.txt is not found, but it also won't display any help.

@wolfmanjm
Copy link
Owner

I may try to fix this later, but finding all the possible places a file could be loaded is a pain.
In the meantime just tell your shortcut to set the working directory, all desktop shortcuts have this option.

@wolfmanjm
Copy link
Owner

I've fixed the gcode-help and macros.ini, but there are several other places where files are expected to be in the working directory. (hb04.ini etc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants