Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Cheukting opened this issue Mar 11, 2023 · 3 comments
Open

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

Cheukting opened this issue Mar 11, 2023 · 3 comments

Comments

@Cheukting
Copy link

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.

@Cheukting
Copy link
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?

@Cheukting
Copy link
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?

@jakirkham
Copy link
Contributor

Is this still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants