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

Possible issue with library #24

Open
ebolisa opened this issue Dec 23, 2021 · 2 comments
Open

Possible issue with library #24

ebolisa opened this issue Dec 23, 2021 · 2 comments

Comments

@ebolisa
Copy link

ebolisa commented Dec 23, 2021

Hi,
Can someone help me out understanding why the lib is crushing?
TIA
Checking version... Current version: 0.0 Latest version: 1.0.0 Updating to version 1.0.0... Downloading version 1.0.0 Traceback (most recent call last): File "<stdin>", line 33, in <module> File "<stdin>", line 18, in Update File "app/ota_updater.py", line 81, in install_update_if_available File "app/ota_updater.py", line 132, in _download_new_version File "app/ota_updater.py", line 140, in _download_all_files TypeError: string indices must be integers, not str
EDIT:
I just read issue #7 but I'm dealing with an ESP32.
Also, I read the memory space just before updating:
Memory free 96256

@rikvermeer
Copy link

The string replacement in the ota_updater that reads json from the github file is corrupt. First of all, it tells nothing about whether it could read your github json directive. Try adding some debug info to the file so you see what URL's it uses and check them manually.

After this phase there should also be no more errors in the httpclient Response class due to the socket being closed or None.

Furthermore... the string replacement that happens after it found the first github directive really messed things up for me. In my case the "main" dir and the "github_src_dir" respectively were "main" and "app/main". The string replacer did replace("main", '').replace('app/main', '') or something... please check it out what the results are for you. For me it created paths like "/main/app/main" and such while i really just wanted "/main".

Overall this script is really handy.
@rdehuyss willing to help

@rdehuyss
Copy link
Owner

rdehuyss commented Feb 2, 2022

@rikvermeer feel free to create a PR but my time is currently limited. If you do so, please make sure to test it well as I won't have the time to do so.

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

3 participants