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

Cannot load non-existent configuration file #890

Closed
rockstorm101 opened this issue Feb 24, 2018 · 1 comment
Closed

Cannot load non-existent configuration file #890

rockstorm101 opened this issue Feb 24, 2018 · 1 comment

Comments

@rockstorm101
Copy link
Collaborator

I get the following errors on a clean Debian Stretch (meaning, no pronsolerc file exists anywhere) when running ./pronterface.py:

ERROR:root:Error loading config file "/home/rock/.config/Printrun/pronsolerc".
[ERROR] Saving failed for set last_window_maximized:'PronterWindow' object has no attribute 'rc_filename'
[ERROR] Saving failed for set last_window_maximized:'PronterWindow' object has no attribute 'rc_filename'
[ERROR] Saving failed for set last_window_width:'PronterWindow' object has no attribute 'rc_filename'
[ERROR] Saving failed for set last_window_width:'PronterWindow' object has no attribute 'rc_filename'
[ERROR] Saving failed for set last_window_height:'PronterWindow' object has no attribute 'rc_filename'
[ERROR] Saving failed for set last_window_height:'PronterWindow' object has no attribute 'rc_filename'

I believe it has something to do with this line

rc = codecs.open(rc_filename, "r", "utf-8")

Changing from "r" to "w+" does the trick.

Could you look at it @legrostdg?

rockstorm101 added a commit to rockstorm101/Printrun that referenced this issue Feb 27, 2018
Reorganize load_default_rc function to make it clearer. And make sure
it creates the configuration file in case it doesn't exist.

(Fixes kliment#890)
rockstorm101 added a commit that referenced this issue Mar 1, 2018
Reorganize load_default_rc function to make it clearer. And make sure
it creates the configuration file in case it doesn't exist.

(Fixes #890)
@rockstorm101
Copy link
Collaborator Author

Fixed via 7dfd4b1.

@rockstorm101 rockstorm101 removed 2.x Non-breaking features and fixes suitable for inclusion in future Printrun 2.x minor releases Not a bug Question Waiting for feedback labels Mar 6, 2018
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

1 participant