Skip to content

AttributeError: 'NoneType' object has no attribute 'startswith' in update.py line 1770

I get an exception running the docker image:

$ podman run --network=none --rm --volume ./repo/:/repo/ -it registry.gitlab.com/fdroid/docker-executable-fdroidserver:master update -c
2024-11-02 18:38:43,170 WARNING: repo_icon "repo/icons/icon.png" does not exist! Check "config.yml".
2024-11-02 18:38:43,300 CRITICAL: Unknown exception found!
Traceback (most recent call last):
  File "/home/vagrant/fdroidserver/fdroid", line 22, in <module>
    fdroidserver.__main__.main()
  File "/home/vagrant/fdroidserver/fdroidserver/__main__.py", line 222, in main
    raise e
  File "/home/vagrant/fdroidserver/fdroidserver/__main__.py", line 203, in main
    mod.main()
  File "/home/vagrant/fdroidserver/fdroidserver/update.py", line 2662, in main
    apks, cachechanged = process_apks(apkcache, repodirs[0], knownapks,
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vagrant/fdroidserver/fdroidserver/update.py", line 2057, in process_apks
    (skip, apk, cachethis) = process_apk(apkcache, apkfilename, repodir, knownapks,
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vagrant/fdroidserver/fdroidserver/update.py", line 1913, in process_apk
    apk = scan_apk(apkfile)
          ^^^^^^^^^^^^^^^^^
  File "/home/vagrant/fdroidserver/fdroidserver/update.py", line 1596, in scan_apk
    scan_apk_androguard(apk, apk_file)
  File "/home/vagrant/fdroidserver/fdroidserver/update.py", line 1770, in scan_apk_androguard
    if vcstr.startswith('0x'):
       ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'startswith'
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information