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

Ensure backup and restore routes have env_values (resolves #10) #11

Merged
merged 1 commit into from
Jun 24, 2023

Conversation

MattDahEpic
Copy link
Contributor

The actual backup and restore are broken but at least the pages show

Copy link
Owner

@dirkhh dirkhh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should fix the issue.
Thanks for finding, reporting, and fixing this!

@dirkhh
Copy link
Owner

dirkhh commented Jun 24, 2023

Can you say more how the backup and restore are broken.
This worked last week 🤷‍♂️

@dirkhh dirkhh merged commit 3c0e621 into dirkhh:main Jun 24, 2023
@MattDahEpic MattDahEpic deleted the backup-env_values branch June 24, 2023 15:24
@MattDahEpic
Copy link
Contributor Author

Can you say more how the backup and restore are broken. This worked last week 🤷‍♂️

Clicking the now visible backup button also results in a 500 with the following logs:

Jun 24 08:24:55 adsb flask[54688]:   File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
Jun 24 08:24:55 adsb flask[54688]:     rv = self.handle_user_exception(e)
Jun 24 08:24:55 adsb flask[54688]:   File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
Jun 24 08:24:55 adsb flask[54688]:     rv = self.dispatch_request()
Jun 24 08:24:55 adsb flask[54688]:   File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
Jun 24 08:24:55 adsb flask[54688]:     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
Jun 24 08:24:55 adsb flask[54688]:   File "/usr/local/share/adsb-pi-setup/app.py", line 120, in backup_execute
Jun 24 08:24:55 adsb flask[54688]:     backup_zip.mkdir("ultrafeeder")
Jun 24 08:24:55 adsb flask[54688]: AttributeError: 'ZipFile' object has no attribute 'mkdir'
Jun 24 08:24:55 adsb flask[54688]: 127.0.0.1 - - [24/Jun/2023 08:24:55] "GET /backupexecute HTTP/1.1" 500 -

@dirkhh
Copy link
Owner

dirkhh commented Jun 24, 2023

Oh
On the pi we get an older Python version it seems.
And apparently I had always tested backup restore on one of the other boards... 🤷‍♂️

Oops

@dirkhh
Copy link
Owner

dirkhh commented Jun 24, 2023

And, reading the documentation some more, it seems like I may not even need the call to mkdir.
I of course didn't bring any SBC on this trip, so I can't test that, though
But since you can log in to your pi, you could use nano to comment out that line and see if it works...

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

Successfully merging this pull request may close these issues.

None yet

2 participants