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

Failed to open settings.xml #101

Closed
Nagirah90 opened this issue May 14, 2022 · 5 comments
Closed

Failed to open settings.xml #101

Nagirah90 opened this issue May 14, 2022 · 5 comments

Comments

@Nagirah90
Copy link

Hey,

I'm trying to auto update ResolveURL from within my plugin but whenever I do this, I get an error afterwards at script.module.resolveurl/lib/init.py line 256. It should check if that file exists before trying to open it.

Thank you!

@Gujal00
Copy link
Owner

Gujal00 commented May 14, 2022

It is still an experimental feature and hasnt been released yet. Is your plugin pulling the development git directly instead of release zip from smrzips repo?

@Nagirah90
Copy link
Author

Yes, I created a workflow that copies latest from your repository and creates a release that my plugin is accessing by commit hash. When kodi then tries to reload the scripts and gets to the import of ResolveURL, your script tries to update the settings and fails when accessing the non-existing settings.xml file in addon_data.

I temporarily put an additional import statement into my update code that is covered by a try/catch block so it doesn't break after an update but that's only a temporary solution. Your code should however check if addon_data contains a settings.xml before

@Gujal00
Copy link
Owner

Gujal00 commented May 16, 2022

As you are pointing to a dev branch, you could run into broken installs all the time. By design the dev branch doesnt have an addons settings.xml file anyway and may keep wiping the users settings xml if installed directly. Not advisable at all.
My release code will have testing done and released as the official zip

@Nagirah90
Copy link
Author

You should however not rely on a file that may or may not exist. This is simply bad coding style

@Gujal00
Copy link
Owner

Gujal00 commented May 19, 2022

Either use the release version or if you insist on using dev version check everyday!
This was fixed the same day the issue was raised in 40e8fe0

@Gujal00 Gujal00 closed this as completed May 19, 2022
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