davidfoerster/aptsources-cleanup

Issue running the script

Closed this issue · 2 comments

I tried the instructions from the answer on stackoverflow to clean duplicate entries issue using this script, but when I try to run it I get following issue:

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "aptsources-cleanup.pyz/__main__.py", line 12, in <module>
  File "/usr/lib/python3.5/runpy.py", line 199, in run_module
    return _run_code(code, {}, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "aptsources-cleanup.pyz/aptsources_cleanup/__main__.py", line 387, in <module>
  File "aptsources-cleanup.pyz/aptsources_cleanup/__main__.py", line 36, in main
  File "aptsources-cleanup.pyz/aptsources_cleanup/__main__.py", line 202, in parse_args
  File "aptsources-cleanup.pyz/aptsources_cleanup/util/functools.py", line 140, in <lambda>
    if op_result is NotImplemented:
  File "aptsources-cleanup.pyz/aptsources_cleanup/util/functools.py", line 94, in _get_instance
    # infinite recursion that could occur when the operator dispatch logic
  File "aptsources-cleanup.pyz/aptsources_cleanup/util/gettext.py", line 133, in _make_translations
    codeset = ''
  File "aptsources-cleanup.pyz/aptsources_cleanup/util/gettext.py", line 110, in translation
    
  File "aptsources-cleanup.pyz/aptsources_cleanup/util/zipfile.py", line 38, in open
    
  File "aptsources-cleanup.pyz/aptsources_cleanup/util/zipfile.py", line 27, in getinfo
    crc32 = binascii.crc32
  File "aptsources-cleanup.pyz/aptsources_cleanup/util/zipfile.py", line 63, in _resolve_path
    ZIP_BZIP2 = 12
AttributeError: module 'os' has no attribute 'fspath'

I see. Python v3.5 has no os.fspath method although it’s still in use and under support in Ubuntu Xenial. That’s a quick fix. I’ll try to look for other missing methods while I’m at it.