当前位置:网站首页>aws-aws help报错

aws-aws help报错

2022-07-07 21:53:00 与数据交流的路上

一、报错详情

Traceback (most recent call last):
  File "/usr/local/bin/aws", line 27, in <module>
    sys.exit(main())
  File "/usr/local/bin/aws", line 23, in main
    return awscli.clidriver.main()
  File "/usr/local/lib/python3.5/dist-packages/awscli/clidriver.py", line 69, in main
    driver = create_clidriver()
  File "/usr/local/lib/python3.5/dist-packages/awscli/clidriver.py", line 79, in create_clidriver
    event_hooks=session.get_component('event_emitter'))
  File "/usr/local/lib/python3.5/dist-packages/awscli/plugin.py", line 44, in load_plugins
    modules = _import_plugins(plugin_mapping)
  File "/usr/local/lib/python3.5/dist-packages/awscli/plugin.py", line 61, in _import_plugins
    module = __import__(path, fromlist=[module])
  File "/usr/local/lib/python3.5/dist-packages/awscli/handlers.py", line 27, in <module>
    from awscli.customizations.cloudformation import initialize as cloudformation_init
  File "/usr/local/lib/python3.5/dist-packages/awscli/customizations/cloudformation/__init__.py", line 13, in <module>
    from awscli.customizations.cloudformation.package import PackageCommand
  File "/usr/local/lib/python3.5/dist-packages/awscli/customizations/cloudformation/package.py", line 26, in <module>
    from awscli.customizations.s3uploader import S3Uploader
  File "/usr/local/lib/python3.5/dist-packages/awscli/customizations/s3uploader.py", line 22, in <module>
    from s3transfer.manager import TransferManager
  File "/usr/local/lib/python3.5/dist-packages/s3transfer/__init__.py", line 592
    range_param = f'bytes={start_range}-{end_range}'
                                                   ^
SyntaxError: invalid syntax

二、解决

1.可以看到报错的重要信息为

File "/usr/local/lib/python3.5/dist-packages/s3transfer/__init__.py", line 592
    range_param = f'bytes={start_range}-{end_range}'
                                                   ^
SyntaxError: invalid syntax

2.查看版本

pip3  show s3transfer
# 报错版本: 0.5.2
# 正常版本: 0.5.0

3.调整版本

pip3 uninstall s3transfer
pip3 install s3transfer==0.5.0

至此,问题解决

原网站

版权声明
本文为[与数据交流的路上]所创,转载请带上原文链接,感谢
https://blog.csdn.net/line_on_database/article/details/125625947