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

Add forgotten encoding argument to open() #987

Merged
merged 1 commit into from
May 31, 2016
Merged

Add forgotten encoding argument to open() #987

merged 1 commit into from
May 31, 2016

Conversation

whitequark
Copy link
Contributor

Without this, conda-build fails on a certain Windows package as follows:

An unexpected error has occurred, please consider sending the
following traceback to the conda GitHub issue tracker at:

    https://github.com/conda/conda-build/issues

Include the output of the command 'conda info' in your report.


Traceback (most recent call last):
  File "c:\slave32\miniconda\Scripts\conda-build-script.py", line 4, in <module>
    sys.exit(main())
  File "c:\slave32\miniconda\lib\site-packages\conda_build\main_build.py", line 192, in main
    args_func(args, p)
  File "c:\slave32\miniconda\lib\site-packages\conda_build\main_build.py", line 486, in args_func
    args.func(args, p)
  File "c:\slave32\miniconda\lib\site-packages\conda_build\main_build.py", line 409, in execute
    include_recipe=args.include_recipe)
  File "c:\slave32\miniconda\lib\site-packages\conda_build\build.py", line 489, in build
    include_recipe=bool(m.path) and include_recipe)
  File "c:\slave32\miniconda\lib\site-packages\conda_build\build.py", line 226, in create_info_files
    fo.write(f + '\n')
  File "c:\slave32\miniconda\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 41-42: character maps to <undefined>

I do not know why it fails exactly, but since the error and the fix were straightforward, I did not investigate it any further.

@msarahan
Copy link
Contributor

Good catch. Looks like an oversight. Merging.

@msarahan msarahan merged commit d5d468d into conda:master May 31, 2016
@github-actions github-actions bot added the locked [bot] locked due to inactivity label May 15, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants