biolab / orange3

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

Add-on installer reports "no internet connection" when opened first time #5695

Closed apenczolgolonabijorbiper closed 1 year ago

apenczolgolonabijorbiper commented 2 years ago

What's wrong?

After downloading and installing https://download.biolab.si/download/files/Orange3-3.30.2-Python3.8.8.dmg

It fails for the first time to open the Add-ons menu - seems to be unable to retrieve the initial package list. it works perfectly for every next attempt though

It is reproducible - happens every time I uninstall and install the Orange 3.30.2 from scratch

https://pasteboard.co/OGWbIsrPpEqC.png

Traceback (most recent call last):
  File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/orangecanvas/application/addons.py", line 695, in <lambda>
    lambda config=config: (config, list_available_versions(config)),
  File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/orangecanvas/application/addons.py", line 1308, in list_available_versions
    distributions.append(response.json())
  File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests/models.py", line 910, in json
    return complexjson.loads(self.text, **kwargs)
  File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

How can we reproduce the problem?

download and install Orange 3.30.2, run the app and go to Options-> Add-ons menu

What's your environment?

markotoplak commented 2 years ago

Thanks, appreciate the bug report.

It works for me though. Let's try to find what is different. What is your system locale (which is the language you are using)? Are there perhaps any firewalls in place?

Could you perhaps open the Python Script widget in Orange and try to run this:

import requests
import json
r = requests.get("https://orange.biolab.si/addons/list")
text = r.text
print(text[:400])
print("len", len(text))
obj = json.loads(text)
print(len(obj))

For me, this script reports:

[
    {
        "info": {
            "author": "Bioinformatics Laboratory, FRI UL",
            "author_email": "info@biolab.si",
            "bugtrack_url": null,
            "classifiers": [
                "Intended Audience :: Developers",
                "Intended Audience :: Education",
                "Intended Audience :: Science/Research",
                "License :: OSI Approved :: GNU 
len 703431
14
markotoplak commented 2 years ago

In the meanwhile, you can use a workaround to install add-ons into your Orange app. In a terminal run:

/Applications/Orange3.app/Contents/MacOS/pip install orange3-educational

You can search for more addons at https://pypi.org.

BlazZupan commented 2 years ago

Same here. But then, I press ok, and then select Options->Add ons... again and then it starts working. It is hard to reproduce this bug.

markotoplak commented 2 years ago

5734 shows the same problem by a user on Mac OS 11.6.1 (20G224) on Intel.

wvdvegte commented 2 years ago

It seems this problem has been eliminated in Orange 3.31!

markotoplak commented 2 years ago

Thanks for reporting this. I have no idea what changed though. :)

markotoplak commented 2 years ago

@BlazZupan, could you check if it also works for you now? Could you try both the old and the new versions?

janezd commented 1 year ago

Closed due to inactivity.