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

Anaconda Distribution for Linux installation failed: 'ascii' codec can't encode character '\xe4' in position 96 #13407

Closed
5 of 8 tasks
hywhuangyuwei opened this issue Jul 29, 2024 · 7 comments
Labels

Comments

@hywhuangyuwei
Copy link

Checklist

  • I added a descriptive title.
  • I searched through existing issues and couldn't find a solution or duplicate issue.
  • I searched on the web (e.g. Google) and didn't find any helpful information.
  • I searched the Anaconda documentation and didn't find any helpful information.

Impacted product

  • A conda package (built by Anaconda)
  • Anaconda Distribution (formerly Anaconda Individual Edition)
  • Miniconda
  • Anaconda.org

What happened?

Install using ./Anaconda3-2024.06-1-Linux-x86_64.sh failed on a fresh Ubuntu 24.04:

Do you accept the license terms? [yes|no]
>>> yes

Anaconda3 will now be installed into this location:
/home/user/anaconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/user/anaconda3] >>>
PREFIX=/home/user/anaconda3
Unpacking payload ...
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "concurrent/futures/process.py", line 261, in _process_worker
  File "conda_package_handling/api.py", line 77, in extract
  File "conda_package_handling/conda_fmt.py", line 46, in extract
  File "conda_package_handling/streaming.py", line 53, in _extract
  File "conda_package_streaming/extract.py", line 47, in extract_stream
  File "tarfile.py", line 2256, in extractall
  File "conda_package_streaming/extract.py", line 42, in checked_members
  File "conda_package_streaming/extract.py", line 33, in is_within_dest_dir
  File "<frozen posixpath>", line 416, in realpath
  File "<frozen posixpath>", line 451, in _joinrealpath
UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 96: ordinal not in range(128)
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "entry_point.py", line 170, in _constructor_extract_conda_pkgs
  File "concurrent/futures/_base.py", line 449, in result
  File "concurrent/futures/_base.py", line 401, in __get_result
UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 96: ordinal not in range(128)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "entry_point.py", line 308, in <module>
  File "entry_point.py", line 300, in main
  File "entry_point.py", line 208, in _constructor_subcommand
  File "entry_point.py", line 172, in _constructor_extract_conda_pkgs
RuntimeError: Failed to extract /home/user/anaconda3/pkgs/sphinx-7.3.7-py312h5eee18b_0.conda: 'ascii' codec can't encode character '\xe4' in position 96: ordinal not in range(128)
[42452] Failed to execute script 'entry_point' due to unhandled exception!

Expected behavior or outcome

N/A

Conda info

No response

Conda config

No response

Conda list

No response

Additional information

No response

@hywhuangyuwei
Copy link
Author

Since ascii appears in the error log, I guess there was something wrong related to language settings.
This got fixed after I add this to my current shell config (which is missed on a freshly installed Ubuntu 24.04):

export LANGUAGE="en_US.utf8"
export LC_ALL="en_US.utf8"
export LC_CTYPE="en_US.utf8"
export LANG="en_US.utf8"

Anyway, it would be better if the error message were more user-friendly.

@marcoesters
Copy link

Thanks @hywhuangyuwei for reporting this and finding the solution! I will forward this to the docs team to add it to our troubleshooting page.

The error message comes from the os module, but I will file issues with conda-package-streaming and/or conda-standalone to see if the encoding can either be handled without errors or to at least improve messaging.

@dholth
Copy link

dholth commented Jul 29, 2024

Which version of Python is the installer using, see https://peps.python.org/pep-0686/

@dholth
Copy link

dholth commented Jul 29, 2024

I downloaded the package, the offending file must be this file, which is test data in ./info/

./info/test/tests/roots/test-images:
testim<C3><A4>ge.png

@marcoesters
Copy link

The bootstrapper was packaged with 3.11.9: https://github.com/AnacondaRecipes/conda-standalone-feedstock/blob/master/recipe/meta.yaml#L6

@dholth
Copy link

dholth commented Jul 29, 2024

Oh, I see the UTF-8 as default is not until Python 15.

@marcoesters
Copy link

Filed the issue here: conda/conda-package-streaming#93

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

No branches or pull requests

3 participants