I have to work behind a corporate proxy. With Conan 0.11.0 on a German Windows 7 I get the following message when trying to query servers outside of the proxy:
>conan install ..\test_package
Boost/1.60.0@lasote/stable: Not found, looking in remotes...
Boost/1.60.0@lasote/stable: Trying with 'conan.io'...
Traceback (most recent call last):
File "<string>", line 10, in <module>
File "<string>", line 6, in run
File "conan\conans\client\command.py", line 767, in main
File "conan\conans\client\command.py", line 688, in run
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 727: ordinal not in range(128)
conan returned -1
This happens regardless of what's in my conan.conf. It tried it with an empty [proxy] section and with the following ways of writing our internal proxy address:
It wasn't a problem when I first tried Conan behind the proxy some months ago. That must've been Conan 0.9.2. A friend told me he had the same error a few weeks ago (0.10.0?).
I should add that the proxy-address does not contain any non-ASCII characters. Same for my username and password.
I think it's not a proxy related problem. It could be windows giving some message. The bad character is "眉". Please try this. Run in your console:
SET CONAN_LOGGING_LEVEL=10
And then retry it in the same console. It will show ugly error traces, please paste all in here and hope to see in what line is failing the encoding.
Thanks!
You're probably right that it isn't a problem with the proxy itself. I put my local server at first place and it crashed while querying the local. I set the loglevel as you mentioned and got the following output:
d:\Projects\ConanTest\buildtest>conan install ..\test_package\
Boost/1.60.0@lasote/stable: Not found, looking in remotes...
DEBUG :proxy.py [169]: Trying with remote local [2016-08-24 12:02:05,971]
Boost/1.60.0@lasote/stable: Trying with 'local'...
DEBUG :version_checker.py[47]: Remote version check result 'None' [2016-08-24 12:02:06,049]
DEBUG :rest_client.py [39]: From server: 400 [2016-08-24 12:02:06,049]
Traceback (most recent call last):
File "logging\__init__.py", line 859, in emit
File "logging\__init__.py", line 732, in format
File "conan\conans\util\log.py", line 13, in format
File "logging\__init__.py", line 474, in format
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 727: ordinal not in range(128)
Logged from file command.py, line 684
Traceback (most recent call last):
File "<string>", line 10, in <module>
File "<string>", line 6, in run
File "conan\conans\client\command.py", line 767, in main
File "conan\conans\client\command.py", line 688, in run
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 727: ordinal not in range(128)
conan returned -1
Do you use pip for install conan or the windows installer? Would be nice if you can test some patch I can prepare a pip package quickly for you. I can't reproduce the error. It seems that an error message is breaking the application's logger.
I'm using the Windows Installer, but I can try to set up pip (though it is a PITA due to our company proxy). I'll check back tomorrow morning.
I was able to get pip running :+1:
I'd be happy to try your custom build :)
OK! great.
run pip install conan==0.12.0.dev0 and will see the error message that it outputs.
I uninstalled the Windows version and reinstalled from pip. On a first look the output did not change:
>conan --version
Conan version 0.12.0dev
>conan upload --remote MyRemote EntityUpdateLib/HEAD@demo/testing
DEBUG :version_checker.py[47]: Remote version check result 'None' [2016-08-25 12:33:22,687]
DEBUG :rest_client.py [39]: From server: 500 [2016-08-25 12:33:22,688]
Traceback (most recent call last):
File "c:\Python27\lib\logging\__init__.py", line 882, in emit
stream.write(fs % msg.encode("UTF-8"))
AttributeError: 'InternalErrorException' object has no attribute 'encode'
Logged from file command.py, line 684
Traceback (most recent call last):
File "C:\Python27\Scripts\conan-script.py", line 9, in <module>
load_entry_point('conan==0.12.0.dev0', 'console_scripts', 'conan')()
File "c:\Python27\lib\site-packages\conans\conan.py", line 6, in run
main(sys.argv[1:])
File "c:\Python27\lib\site-packages\conans\client\command.py", line 767, in main
error = command.run(args)
File "c:\Python27\lib\site-packages\conans\client\command.py", line 688, in run
self._user_io.out.error(str(exc))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 665: ordinal not in range(128)
Uf! some differences but not too much progresses. Let me think.
This is the error behind:
So our (german) proxy is probably telling me that the target is not reachable or something similar.
Please, try with "pip install conan==0.12.0.dev1". @memsharded fixed some things related with output and server responses.
Just tried it. Our IT department put a German message with multiple 眉 into the Network-error message:
>conan --version
Conan version 0.12.0dev
>conan search -r MyRemote
ERROR: <HTML><HEAD>
<TITLE>Network Error</TITLE>
</HEAD>
<BODY>
<FONT face="Helvetica">
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border=0 cellPadding=1 width="80%">
<TR><TD>
<FONT face="Helvetica">
<big>Network Error (tcp_error)</big>
<BR>
<BR>
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
A communication error occurred: "Operation timed out"
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at
a later time.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica" SIZE=2>
<BR>
F眉r Unterst眉tzung wenden Sie sich bitte an das: /\ For further assistance please refer to: [...])
</FONT>
</TD></TR>
</TABLE>
</blockquote>
</FONT>
</BODY></HTML>
I see! The good news is that the issue seems to be fixed (can be closed). A different thing is that the proxy setup is not working as expected I guess, but that can be managed in a new issue if necessary. Thanks!
Your proxy config works as expected - The error occurs due to a malconfiguration on my side. I'll close this issue, thanks for the great support so far!
Most helpful comment
Your proxy config works as expected - The error occurs due to a malconfiguration on my side. I'll close this issue, thanks for the great support so far!