biolab / orange3

šŸŠ :bar_chart: :bulb: Orange: Interactive data analysis
https://orangedatamining.com
Other
4.85k stars 1.01k forks source link

Getting an Internet error with Options_Add Ons #4707

Closed I-Zapp closed 4 years ago

I-Zapp commented 4 years ago

Describe the bug When I click Options and then choose Add-Ons I obtain the Warning "There's an issue with your Internet connection ..." and then the list is empty.

Windows 10 with Internet fully working.

OrangeBug

ales-erjavec commented 4 years ago

Can you click "Show Details..." and post its contents.

I-Zapp commented 4 years ago

Traceback (most recent call last): File "S:\Orange\lib\site-packages\urllib3\connection.py", line 157, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "S:\Orange\lib\site-packages\urllib3\util\connection.py", line 61, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "S:\Orange\lib\socket.py", line 752, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "S:\Orange\lib\site-packages\urllib3\connectionpool.py", line 662, in urlopen self._prepare_proxy(conn) File "S:\Orange\lib\site-packages\urllib3\connectionpool.py", line 948, in _prepare_proxy conn.connect() File "S:\Orange\lib\site-packages\urllib3\connection.py", line 300, in connect conn = self._new_conn() File "S:\Orange\lib\site-packages\urllib3\connection.py", line 169, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x000001DB3BE65888>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "S:\Orange\lib\site-packages\requests\adapters.py", line 449, in send timeout=timeout File "S:\Orange\lib\site-packages\urllib3\connectionpool.py", line 720, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "S:\Orange\lib\site-packages\urllib3\util\retry.py", line 436, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='orange.biolab.si', port=443): Max retries exceeded with url: /addons/list (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001DB3BE65888>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "S:\Orange\lib\concurrent\futures\thread.py", line 57, in run result = self.fn(*self.args, self.kwargs) File "S:\Orange\lib\site-packages\orangecanvas\application\addons.py", line 679, in lambda config=config: (config, list_available_versions(config)), File "S:\Orange\lib\site-packages\orangecanvas\application\addons.py", line 1205, in list_available_versions defaults = config.addon_defaults_list() File "S:\Orange\lib\site-packages\Orange\canvas\config.py", line 158, in addon_defaults_list return session.get(OFFICIAL_ADDON_LIST).json() File "S:\Orange\lib\site-packages\requests\sessions.py", line 543, in get return self.request('GET', url, kwargs) File "S:\Orange\lib\site-packages\requests\sessions.py", line 530, in request resp = self.send(prep, send_kwargs) File "S:\Orange\lib\site-packages\requests\sessions.py", line 643, in send r = adapter.send(request, kwargs) File "S:\Orange\lib\site-packages\requests\adapters.py", line 510, in send raise ProxyError(e, request=request) requests.exceptions.ProxyError: HTTPSConnectionPool(host='orange.biolab.si', port=443): Max retries exceeded with url: /addons/list (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001DB3BE65888>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')))

I-Zapp commented 4 years ago

I may add that version 3.25 is working perfectly on my MacBook Pro, on the same network, with all addons

ales-erjavec commented 4 years ago

Can you open Options/Settings from the main window and check the Network tab to see if you have any proxy setting set, and if so that they are correct.

I-Zapp commented 4 years ago

Network

I-Zapp commented 4 years ago

My MacBook Pro, on the same network, is pretty happy with the same settings (nothing, nothing)

ajdapretnar commented 4 years ago

Yes, I think you should enter your proxy details here, otherwise the connection won't work.

I-Zapp commented 4 years ago

Thank'you for your answer; as I said, my mac is on the same network and everything works with no proxi.

I-Zapp commented 4 years ago

Anyway, I have no proxy, should I try the router's IP?

Edit: tried the router's IP, same problem.

ales-erjavec commented 4 years ago

Can you open Orange, add a Python Script widget to a new workflow and run the following script

import os
from urllib.request import getproxies
print("getproxies():", getproxies())
print("env http-proxy:", os.environ.get("http-proxy"))
print("env https-proxy:", os.environ.get("https-proxy"))
I-Zapp commented 4 years ago

Here it is:

Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. (PythonConsole)

Running script: getproxies(): {} env http-proxy: None env https-proxy: None

ales-erjavec commented 4 years ago

Sorry the script was wrong. Can you repeat with

from urllib.request import getproxies, getproxies_environment
print("getproxies():", getproxies())
print("getproxies_environment()", getproxies_environment())
I-Zapp commented 4 years ago

Done, here is what I see:

Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. (PythonConsole)

Running script: getproxies(): {} getproxies_environment() {}

ales-erjavec commented 4 years ago

Well I'm stumped. Those are AFAIK the only sources of proxy config that could cause the proxy to be involved in the process.

ajdapretnar commented 4 years ago

I had a couple of similar reports recently from the users. I got the feeling that none were behind a proxy, yet they got this error. As if Orange somehow wrongly assumed there was a proxy involved. šŸ¤·

I-Zapp commented 4 years ago

I can assure you I'm not behind a proxi: my macbook on the same network has no problem with Orange :-)

markotoplak commented 4 years ago

I double checked this and I do not know where to look for the bug either. @I-Zapp, if you think of anything that could help us debug it, please notify us.

markotoplak commented 4 years ago

@I-Zapp, can you please also try the following script in Python script widget?

import os
import requests
from urllib.request import getproxies
print("getproxies():", getproxies())
print("env http-proxy:", os.environ.get("http-proxy"))
print("env https-proxy:", os.environ.get("https-proxy"))
print("env for addons list:", requests.utils.get_environ_proxies('https://orange.biolab.si/addons/list'))
markotoplak commented 4 years ago

Also, are you perhaps using some kind of a VPN?

I-Zapp commented 4 years ago

Thank'you for your answer, and as I said a macbook pro on the same network works perfectly well with Orange. I am not using a VPN. Here are the results of your Python script:

Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. (PythonConsole)

Running script: getproxies(): {} env http-proxy: None env https-proxy: None env for addons list: {}

I-Zapp commented 4 years ago

Any other way I can download the addon to my filesystem and then trick Orange into thinking to get its addon from there? A config file maybe? On a different track: is there any cointainerized version that I can download from somewhere?

And, since we are here, I would like to have a contact with your maths guys (I am a mathematician and director of a phd and post-doc research group in ML and AI) to explore some possible opportunities for the future that I am sure you might find interesting.

Thanks

A.D.

ajdapretnar commented 4 years ago

@I-Zapp On Windows, you should have Orange Command Prompt (provided you installed Orange via its official installer). You can open the prompt and manually install add-ons, for example: conda install orange3-text

As for containerized version, see https://orange.biolab.si/blog/2020/2020-01-16-orange-cloud/. Also @acopar might be able to help with issues if needed.

For cooperation, please send an e-mail to info@biolab.si.

I-Zapp commented 4 years ago

Thank'you for your answer, I'll try and test the docker version next week.

Also, the command line version of the addon installer looks promising. Where can I find the names of the different addons? (orange3-text in your example).

AD

I-Zapp commented 4 years ago

Found it: https://anaconda.org/search?q=orange3

I-Zapp commented 4 years ago

I'm happy to report that thanks to the

conda install [addin name]

trick I have a working Orange3 on my main PC with al addons installed.

Now I'll have to study the container setup for my lab's cloud.

Thanks for now, I'll get back to you for the collaboration opportunities.

Andrea

markotoplak commented 4 years ago

@I-Zapp, does the Datasets widget work for you? It also uses similar network libraries.

I-Zapp commented 4 years ago

Hi Marko, yes, the Datasets widget works perfectly.

Bye

Andrea

yuanxin-cq commented 4 years ago

I installed Win64OpenSSL_Light-1_1_1g.msi and get rid of this problem .My os is windows10.

janezd commented 4 years ago

@I-Zapp, can you try this?

I vaguely remember having some problems with conda or pip on some faculty computers, which were caused by incompatibility between Windows 10 libraries and Python's ssl modules.

I-Zapp commented 4 years ago

Tried it, same problem ....

AD

dsoasti commented 4 years ago

I installed Win64OpenSSL_Light-1_1_1g.msi and get rid of this problem .My os is windows10.

How did you install it?

dsoasti commented 4 years ago

IĀ“ve installed this Win64OpenSSL_Light-1_1_1g.msi, but I still canĀ“t make it work... Captura Any help?

markotoplak commented 4 years ago

@dsoasti, your error message is different; for a solution to your problem see #4720.

dsoasti commented 4 years ago

Thanks!

janezd commented 4 years ago

I fear this will be filed under "unresolved misteries". Unless the error happens to somebody who can debug it.

PerryGogas commented 2 months ago

Thank'you for your answer, I'll try and test the docker version next week.

Also, the command line version of the addon installer looks promising. Where can I find the names of the different addons? (orange3-text in your example).

AD

How can I do this guys? like this? I did this and didn't work...

screenshot_974

ajdapretnar commented 2 months ago

@PerryGogas These are just preferences, not installation dialogue. To install add-ons, go to Options - Add-ons. There, you don't need to type the commands, just select the add-on you wish to install. If you wish to add another package to Orange environment, go to Add more... on the right, and enter the name of the package as seen on PyPi.

PerryGogas commented 2 months ago

@PerryGogas These are just preferences, not installation dialogue. To install add-ons, go to Options - Add-ons. There, you don't need to type the commands, just select the add-on you wish to install. If you wish to add another package to Orange environment, go to Add more... on the right, and enter the name of the package as seen on PyPi.

Thanks! I tried it like that as you described but then I get this.

image

ajdapretnar commented 2 months ago

Are you using conda? Because this could be the underlying issue. Conda often doesn't have up-to-date Orange versions, so there might be incompatibility with certain add-ons (my guess). To further solve the issue I'd need the OS, Orange version and how you installed it.

PerryGogas commented 2 months ago

Are you using conda? Because this could be the underlying issue. Conda often doesn't have up-to-date Orange versions, so there might be incompatibility with certain add-ons (my guess). To further solve the issue I'd need the OS, Orange version and how you installed it.

I installed this as was required by Orange

image

The version is 3.36.0

I am trying to manually install the addons becasue I had this isssue:

image

The OS is Windows 10. I installed it from: https://oldorange.biolab.si/download/#windows

ajdapretnar commented 2 months ago

@PerryGogas Would you mind posting the details from the previous error here? From when you tried to install the add-on manually? Click Show details and post it here, please.

PerryGogas commented 2 months ago

@PerryGogas Would you mind posting the details from the previous error here? From when you tried to install the add-on manually? Click Show details and post it here, please.

If you mean this: image

The details are:

Traceback (most recent call last): File "C:\Program Files\Orange\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(self.args, self.kwargs) File "C:\Program Files\Orange\lib\site-packages\orangecanvas\application\addons.py", line 510, in lambda config=config: (config, list_available_versions(config)), File "C:\Program Files\Orange\lib\site-packages\orangecanvas\application\utils\addons.py", line 369, in list_available_versions response = session.get(PYPI_API_JSON.format(name=p)) File "C:\Program Files\Orange\lib\site-packages\requests_cache\session.py", line 102, in get return self.request('GET', url, params=params, kwargs) File "C:\Program Files\Orange\lib\site-packages\requests_cache\session.py", line 158, in request return super().request(method, url, args, headers=headers, kwargs) # type: ignore File "C:\Program Files\Orange\lib\site-packages\requests\sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "C:\Program Files\Orange\lib\site-packages\requests_cache\session.py", line 194, in send actions.update_from_cached_response(cached_response, self.cache.create_key, **kwargs) File "C:\Program Files\Orange\lib\site-packages\requests_cache\policy\actions.py", line 184, in update_from_cached_response usable_response = self.is_usable(cached_response) File "C:\Program Files\Orange\lib\site-packages\requests_cache\policy\actions.py", line 152, in is_usable or (cached_response.is_expired and self._stale_while_revalidate is True) File "C:\Program Files\Orange\lib\site-packages\requests_cache\models\response.py", line 149, in is_expired return self.expires is not None and datetime.utcnow() >= self.expires TypeError: can't compare offset-naive and offset-aware datetimes

PerryGogas commented 2 months ago

@PerryGogas Would you mind posting the details from the previous error here? From when you tried to install the add-on manually? Click Show details and post it here, please.

When I go to: image

And I type this:

image

I get: image

But when I click OK I get: image

The details are: ERROR: Invalid requirement: 'conda-forge::orange3-explain' WARNING: There was an error checking the latest version of pip.

ajdapretnar commented 2 months ago

Thanks for your report. I think this warrants opening a new issue. I'll discuss with the team and open one if necessary.

PerryGogas commented 2 months ago

Thanks for your report. I think this warrants opening a new issue. I'll discuss with the team and open one if necessary.

Thank you so much! I use Orange in my graduate courses and my students now have this issue while they have to submit their MBA thesis...

It all started from installing the 3.37.0 version.

ajdapretnar commented 2 months ago

p.s. Could you also add the "Show details" from the second error after trying to install orange3-explain.

PerryGogas commented 2 months ago

p.s. Could you also add the "Show details" from the second error after trying to install orange3-explain.

Yes, I get this:

ERROR: Invalid requirement: 'conda-forge::orange3-explain' WARNING: There was an error checking the latest version of pip.

ajdapretnar commented 2 months ago

Idea from a colleague: did you remove the pip arguments you had entered in the Settings? image

ales-erjavec commented 2 months ago

From: https://github.com/biolab/orange3/issues/6744#issuecomment-1959335669

Can you try moving/deleting 'C:\Users\\%USERNAME%\AppData\Local\Orange\cache\networkcache' where %USERNAME% is your login name

PerryGogas commented 2 months ago

From: #6744 (comment)

Can you try moving/deleting 'C:\Users\%USERNAME%\AppData\Local\Orange\cache\networkcache' where %USERNAME% is your login name

I did it and while I was able to get to this screen: image

After pressing OK to install the explain addon I got: image

And the details say: ERROR: Invalid requirement: 'conda-forge::orange3-explain' WARNING: There was an error checking the latest version of pip.