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

cest-pas-sorcier_fr_top didn't appear on IIAB main page and Python JSONDecodeError #3602

Open
holta opened this issue Jun 13, 2023 · 4 comments

Comments

@holta
Copy link
Member

holta commented Jun 13, 2023

Just a photo for now, but hopefully @nzola can explain more later today:

IMG-20230613-WA0003

Hopefully he can provide iiab-diagnostics and additional details within ~24h.

(This is very likely happening on Raspberry Pi OS. As that's what he generally uses.)

@nzola
Copy link

nzola commented Jun 13, 2023

PUBLISHING TO URL...
http://sprunge.us/MhbXUt

@holta
Copy link
Member Author

holta commented Jun 13, 2023

  1. I just logged into @nzola's machine and this worked to add the missing cest-pas-sorcier_fr_top to his IIAB home page:

    root@lokole1:/library/www/html/home# iiab-update-menus
    Updating Home Page Menu
    Updating kiwix menu items
    Adding fr-cest-pas-sorcier_fr_top to Menu
    Updating iiab installed services' menu items
    Updating installed OER2Go menu items
    
    root@lokole1:/library/www/html/home# diff menu.json.sorcier-missing menu.json
    61a62
    >     "fr-cest-pas-sorcier_fr_top",
    
    ...
    
    root@lokole1:/library/zims/content# ls -l cest-pas-sorcier_fr_top_2021-01.zim
    -rw-r--r-- 1 root root 9877741846 Apr 20  2021 cest-pas-sorcier_fr_top_2021-01.zim
    
  2. @tim-moody do you want to log in, to try to better understand the original Python JSONDecodeError issue?

@tim-moody
Copy link
Contributor

tim-moody commented Jun 14, 2023

This appears to be another case of #3487.

  • The point of failure was line 1004 in adm_lib.py.
  • But it is almost impossible to reconstruct what events led to this.
  • The log shows that this error happened in the second step of the download of the cest_sorcier top zim, but it need not be due to that zim or its menu def. It simply failed to read the menu.json file prior to adding that zim to the menu.
  • The menu.json file purported to have failed has been preserved by renaming, but adm_lib reads it with no error.
  • None of the corruptions in other instances of this problem are found in this file.
  • I downloaded that zim through the Admin Console on my VM, and it was added to the home page with no problem.

The only unexpected results are

  • No error messages were issued implying that verbose=False
  • Seems that no attempt was made to fix the file implying that fix_json=False (it's hard to be sure since there are no messages)

@holta
Copy link
Member Author

holta commented Jun 14, 2023

This appears to be another case of #3487.

Great that diagnostic leads are documented (in case this happens again).

Thanks @nzola and @tim-moody for having spent the time to dig into this 🕵️

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

No branches or pull requests

3 participants