aboutcode-org / python-inspector

Inspect Python code and PyPI package manifests. Resolve Python dependencies.
22 stars 19 forks source link

Issues with hard-coded .cache location #113

Closed JonoYang closed 1 year ago

JonoYang commented 1 year ago

I've created an AppImage of scancode.io and I run into the following error when I try to run it:

  File "/tmp/.mount_scancoM6DHdp/usr/share/scancodeio/scanpipe/pipes/resolve.py", line 32, in <module>
    from python_inspector.resolve_cli import resolver_api
  File "/tmp/.mount_scancoM6DHdp/usr/lib/python3.8/dist-packages/python_inspector/resolve_cli.py", line 16, in <module>
    from python_inspector import utils_pypi
  File "/tmp/.mount_scancoM6DHdp/usr/lib/python3.8/dist-packages/python_inspector/utils_pypi.py", line 1649, in <module>
    CACHE = Cache()
  File "<attrs generated init python_inspector.utils_pypi.Cache>", line 3, in __init__
  File "/tmp/.mount_scancoM6DHdp/usr/lib/python3.8/dist-packages/python_inspector/utils_pypi.py", line 1609, in __attrs_post_init__
    os.makedirs(self.directory, exist_ok=True)
  File "/tmp/.mount_scancoM6DHdp/usr/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/tmp/.mount_scancoM6DHdp/usr/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '.cache'
TG1999 commented 1 year ago

Fixed in #114