8000 AttributeError: module 'base64' has no attribute 'encodestring' · Issue #639 · anaconda/anaconda-client · GitHub
[go: up one dir, main page]

Skip to content

AttributeError: module 'base64' has no attribute 'encodestring' #639

Open

Description

@Cheukting

Hi, while using it with Python 3.10.9 from pyenv. I got the follow error:

[ERROR] 
Traceback (most recent call last):
  File "/Users/cheuktingho/.pyenv/versions/anaconda/bin/anaconda", line 33, in <module>
    sys.exit(load_entry_point('anaconda-client==1.2.2', 'console_scripts', 'anaconda')())
  File "/Users/cheuktingho/.pyenv/versions/3.10.9/envs/anaconda/lib/python3.10/site-packages/binstar_client/scripts/cli.py", line 86, in main
    binstar_main(command_module, args, exit,
  File "/Users/cheuktingho/.pyenv/versions/3.10.9/envs/anaconda/lib/python3.10/site-packages/binstar_client/scripts/cli.py", line 66, in binstar_main
    return args.main(args)
  File "/Users/cheuktingho/.pyenv/versions/3.10.9/envs/anaconda/lib/python3.10/site-packages/binstar_client/commands/notebook.py", line 111, in upload
    upload_info = uploader.upload(force=args.force)
  File "/Users/cheuktingho/.pyenv/versions/3.10.9/envs/anaconda/lib/python3.10/site-packages/binstar_client/utils/notebook/uploader.py", line 41, in upload
    return self.aserver_api.upload(self.username, self.project, self.version,
  File "/Users/cheuktingho/.pyenv/versions/3.10.9/envs/anaconda/lib/python3.10/site-packages/binstar_client/__init__.py", line 423, in upload
    _hexmd5, b64md5, size = compute_hash(fd, size=size)
  File "/Users/cheuktingho/.pyenv/versions/3.10.9/envs/anaconda/lib/python3.10/site-packages/binstar_client/utils/__init__.py", line 309, in compute_hash
    b64encode = getattr(base64, 'encodebytes', base64.encodestring)
AttributeError: module 'base64' has no attribute 'encodestring'

Seems the problem is from binstar_client and they are not Python 3.9 or above compatible. I am not sure where this dependency is coming from so I have no idea how to fix this. Would be great if you can advice.

Activity

  1. Cheukting commented on Mar 11, 2023

    @Cheukting
    Author

    With further investigation, seems the code provided in the binstar_client in this repo correctly encounters the version compatibility but somehow the version I have is 1.2.2 which has not encountered this problem. I guess there have not been more updated releases on PyPI?

  2. Cheukting commented on Mar 11, 2023

    @Cheukting
    Author

    Uninstalled and reinstall with pip install git+https://github.com/Anaconda-Server/anaconda-client then encounter ERROR: No matching distribution found for conda-package-handling>=1.7.3 Is conda the only way to install it properly right now?

  3. jakirkham commented on Feb 22, 2024

    @jakirkham
    Contributor

    Is this still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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

      0