Skip to content

Latest zipapp package fails with missing backports.tarfile dependency #235

@hww-nikhilshankarnoble

Description

@hww-nikhilshankarnoble

Hi Cloudsmith team,

It looks like the latest zipapp version 1.9.0 of the Cloudsmith CLI is failing due to a missing dependency on backport.tarfile module, running any command gives the below error.

This is using Python 3.10.12 on Ubuntu 22.04 - installing via Pip appears to be working without issue.

wget https://dl.cloudsmith.io/public/cloudsmith/cli-zipapp/raw/names/cloudsmith-cli/versions/latest/cloudsmith.pyz
python3 cloudsmith-1.9.0.pyz --help
Traceback (most recent call last):               
  File "/home/nikhilshankarnoble@hogarthww.prv/Downloads/cloudsmith-1.9.0.pyz/_bootstrap/__init__.py", line 76, in import_string                                                                             
  File "/home/nikhilshankarnoble@hogarthww.prv/.shiv/cloudsmith-1.9.0.pyz_bb3394665744db1644f722e3bc7b701306dbeef414ae248a1c19ee146d337df1/site-packages/cloudsmith_cli/cli/commands/__init__.py", line 3, in <module>                                                                    
    from . import (                                                                                                                                                                                                                    
  File "/home/nikhilshankarnoble@hogarthww.prv/.shiv/cloudsmith-1.9.0.pyz_bb3394665744db1644f722e3bc7b701306dbeef414ae248a1c19ee146d337df1/site-packages/cloudsmith_cli/cli/commands/auth.py", line 7, in <module>                                                                        
    from .. import decorators, validators                                                                                                                                                                                              
  File "/home/nikhilshankarnoble@hogarthww.prv/.shiv/cloudsmith-1.9.0.pyz_bb3394665744db1644f722e3bc7b701306dbeef414ae248a1c19ee146d337df1/site-packages/cloudsmith_cli/cli/decorators.py", line 7, in <module>                                                                           
    from ..core.api.init import initialise_api as _initialise_api                                                                                                                                                                      
  File "/home/nikhilshankarnoble@hogarthww.prv/.shiv/cloudsmith-1.9.0.pyz_bb3394665744db1644f722e3bc7b701306dbeef414ae248a1c19ee146d337df1/site-packages/cloudsmith_cli/core/api/init.py", line 10, in <module>                                                                           
    from .. import keyring                                                                                                                                                                                                             
  File "/home/nikhilshankarnoble@hogarthww.prv/.shiv/cloudsmith-1.9.0.pyz_bb3394665744db1644f722e3bc7b701306dbeef414ae248a1c19ee146d337df1/site-packages/cloudsmith_cli/core/keyring.py", line 4, in <module>                                                                             
    import keyring                                                                                                                                                                                 
  File "/home/nikhilshankarnoble@hogarthww.prv/.shiv/cloudsmith-1.9.0.pyz_bb3394665744db1644f722e3bc7b701306dbeef414ae248a1c19ee146d337df1/site-packages/keyring/__init__.py", line 1, in <module>                                                                                        
    from .core import (                                                                                            
  File "/home/nikhilshankarnoble@hogarthww.prv/.shiv/cloudsmith-1.9.0.pyz_bb3394665744db1644f722e3bc7b701306dbeef414ae248a1c19ee146d337df1/site-packages/keyring/core.py", line 11, in <module>                                                                                           
    from . import backend, credentials
  File "/home/nikhilshankarnoble@hogarthww.prv/.shiv/cloudsmith-1.9.0.pyz_bb3394665744db1644f722e3bc7b701306dbeef414ae248a1c19ee146d337df1/site-packages/keyring/backend.py", line 16, in <module>  
    from jaraco.context import ExceptionTrap                                                                       
  File "/home/nikhilshankarnoble@hogarthww.prv/.shiv/cloudsmith-1.9.0.pyz_bb3394665744db1644f722e3bc7b701306dbeef414ae248a1c19ee146d337df1/site-packages/jaraco/context/__init__.py", line 19, in <module>                                                                                
    from backports import tarfile                                                                                                                                                                  
ImportError: cannot import name 'tarfile' from 'backports' (unknown location)                                                                                                                      
                                                         
During handling of the above exception, another exception occurred:    
                                                         
Traceback (most recent call last):                                                                                 
  File "/home/nikhilshankarnoble@hogarthww.prv/Downloads/cloudsmith-1.9.0.pyz/_bootstrap/__init__.py", line 84, in import_string                                                                                                                                                          
AttributeError: module 'cloudsmith_cli.cli' has no attribute 'commands'                                        
                                                                                                                                                                                                                                       
During handling of the above exception, another exception occurred:   

Let me know if there's any more information I can provide :)

Thanks!
Nikhil

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions