bifacial_radiance icon indicating copy to clipboard operation
bifacial_radiance copied to clipboard

Error message "407 Proxy Authentication Required"

Open rafaelbianchifotovoltec opened this issue 4 years ago • 4 comments

Hello,

I have a question: How do I insert my proxy server address in the Bifacial Radiance main control? I'm asking you because everytime that I simulate my Scene, the console window shows the following message "407 Proxy Authentication Required". Thank you in advance. Waiting for your answer.

rafaelbianchifotovoltec avatar May 08 '20 17:05 rafaelbianchifotovoltec

Thanks for posting -this is a new error for me, and seems to indicate a web connection error. Could you please copy-paste the exact error message and traceback to see where in the bifacial_radiance code it is arising? It may be coming from epwfile = demo.getEPW(44, -110) which goes out to the internet to pull an EPW file.

cdeline avatar May 21 '20 16:05 cdeline

Thanks for your message. Well, follows the error message and traceback for you analysis.

runfile('C:/Users/FVT PC-03/Desktop/Bifacial-Radiance/bifacial_radiance-master/bifacial_radiance/gui.py', wdir='C:/Users/FVT PC-03/Desktop/Bifacial-Radiance/bifacial_radiance-master/bifacial_radiance') Finish reading file C:/Users/FVT PC-03/Desktop/Bifacial-Radiance/bifacial_radiance-master/Simulaçoes/Simulação_R00/simulation.ini Read all values path = C:/Users/FVT PC-03/Desktop/Bifacial-Radiance/bifacial_radiance-master/Simulaçoes/Simulação_R00 Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 662, in urlopen self._prepare_proxy(conn) File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 948, in _prepare_proxy conn.connect() File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\urllib3\connection.py", line 308, in connect self._tunnel() File "C:\Users\FVT PC-03\anaconda3\lib\http\client.py", line 921, in _tunnel message.strip())) OSError: Tunnel connection failed: 407 Proxy Authentication Required

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\requests\adapters.py", line 449, in send timeout=timeout File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 720, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\urllib3\util\retry.py", line 436, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /NREL/EnergyPlus/raw/develop/weather/master.geojson (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\FVT PC-03\anaconda3\lib\tkinter_init_.py", line 1705, in call return self.func(*args) File "C:\Users\FVT PC-03\Desktop\Bifacial-Radiance\bifacial_radiance-master\bifacial_radiance\gui.py", line 439, in runBifacialRadiance cellLevelModuleParamsDict=cellLevelModuleParamsDict File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\bifacial_radiance\modelchain.py", line 131, in runModelChain simulationParamsDict['latitude'], simulationParamsDict['longitude']) # pull EPW data for any global lat/lon File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\bifacial_radiance\main.py", line 473, in getEPW df = _returnEPWnames() File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\bifacial_radiance\main.py", line 437, in _returnEPWnames r = requests.get('https://github.com/NREL/EnergyPlus/raw/develop/weather/master.geojson', verify=False) File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\requests\api.py", line 75, in get return request('get', url, params=params, **kwargs) File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\requests\api.py", line 60, in request return session.request(method=method, url=url, **kwargs) File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\requests\sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\requests\sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "C:\Users\FVT PC-03\anaconda3\lib\site-packages\requests\adapters.py", line 510, in send raise ProxyError(e, request=request) requests.exceptions.ProxyError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /NREL/EnergyPlus/raw/develop/weather/master.geojson (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required'))) Traceback (most recent call last):

File "C:\Users\FVT PC-03\Desktop\Bifacial-Radiance\bifacial_radiance-master\bifacial_radiance\gui.py", line 1796, in gui()

File "C:\Users\FVT PC-03\Desktop\Bifacial-Radiance\bifacial_radiance-master\bifacial_radiance\gui.py", line 1787, in gui root.mainloop()

File "C:\Users\FVT PC-03\anaconda3\lib\tkinter_init_.py", line 1283, in mainloop self.tk.mainloop(n)

rafaelbianchifotovoltec avatar May 28 '20 17:05 rafaelbianchifotovoltec

OK, thanks. This is an error related to getEPW, which requires internet connection. Sometimes your work computer has a firewall that blocks internet connection for Python applications to minimize virus risk. You can either work with your IT department to get a firewall exception for Python applications, or manually download the EPW files using the energyplus website here and put the files in your \EPWs\ folder for your bifacial_radiance simulation.

cdeline avatar May 28 '20 17:05 cdeline

Todo: meaningful firewall error message for urllib3 exception with suggestion to manually download data .

cdeline avatar May 28 '20 17:05 cdeline