Code Monkey home page Code Monkey logo

Comments (13)

 avatar commented on August 14, 2024 1

i have managed to avoid the problem by using requests.get instead of urllib.urlopen:

        # Check for new version on github
        try:
            Appupdate = requests.get("https://api.github.com/repos/overmindstudios/BlenderUpdater/releases/latest").text
            logger.info('Getting update info - success')
            UpdateData = json.loads(Appupdate)
            applatestversion = UpdateData['tag_name']
            logger.info('Version found online: ' + UpdateData['tag_name'])
            if StrictVersion(applatestversion) > StrictVersion(appversion):
                logger.info('Newer version found on Github')
                self.btn_newVersion.clicked.connect(self.getAppUpdate)
                self.btn_newVersion.setStyleSheet('background: rgb(73, 50, 20)')
                self.btn_newVersion.show()
        except Exception:
            QtWidgets.QMessageBox.critical(None, "Error", "Unable to get Github update information" )
            logger.error('Unable to get update information from GitHub')

from blenderupdater.

tobkum avatar tobkum commented on August 14, 2024

Just commited something, can you retry with the new BlenderUpdater.py and post the log here?

from blenderupdater.

 avatar commented on August 14, 2024
$ python3 BlenderUpdater.py
BlenderUpdater.py:141: SyntaxWarning: name 'appversion' is used prior to global declaration
  global appversion
libpng warning: iCCP: known incorrect sRGB profile
Traceback (most recent call last):
  File "BlenderUpdater.py", line 667, in <module>
    main()
  File "BlenderUpdater.py", line 659, in main
    window = BlenderUpdater()
  File "BlenderUpdater.py", line 209, in __init__
    UpdateData = json.loads(Appupdate)
UnboundLocalError: local variable 'Appupdate' referenced before assignment

from blenderupdater.

tobkum avatar tobkum commented on August 14, 2024

And the content of the BlenderUpdater.log that gets generated please :)

from blenderupdater.

 avatar commented on August 14, 2024
INFO 2018-04-04 14:10:20,596 - Running version 1.9
DEBUG 2018-04-04 14:10:20,596 - Constructing UI
DEBUG 2018-04-04 14:10:20,656 - No previous config found
ERROR 2018-04-04 14:10:23,332 - Unable to get update information from GitHub

from blenderupdater.

 avatar commented on August 14, 2024

you are using a try to create the Appupdate variable, this one does not initialize any value in Appupdate when it fails, so it gives the error later.

from blenderupdater.

tobkum avatar tobkum commented on August 14, 2024

That is weird, since it works on Win and Linux. Can you make sure that the following URL is reachable from your system

https://api.github.com/repos/overmindstudios/BlenderUpdater/releases/latest

It should output something like that:
image

from blenderupdater.

 avatar commented on August 14, 2024

Yes can view the utl.
it looks like it's a problem with my system with ssl or python3.

>>> import requests
>>> import urllib.request
>>> import urllib.parse
>>> a = urllib.request.urlopen('https://api.github.com/repos/overmindstudios/BlenderUpdater/releases/latest').read().decode('utf-8')
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 1240, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1083, in request
    self._send_request(method, url, body, headers)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1128, in _send_request
    self.endheaders(body)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1079, in endheaders
    self._send_output(message_body)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 911, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 854, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 1237, in connect
    server_hostname=server_hostname)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 376, in wrap_socket
    _context=self)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 747, in __init__
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 983, in do_handshake
    self._sslobj.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 628, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 162, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 465, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 483, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 443, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 1283, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/urllib/request.py", line 1242, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)>

from blenderupdater.

tobkum avatar tobkum commented on August 14, 2024

Interesting, seems that the default OSX ssl version does not match.
Found some comments here: kelproject/pykube#80 (comment)
and here: https://stackoverflow.com/a/49466649

from blenderupdater.

tobkum avatar tobkum commented on August 14, 2024

Could you try a pip install 'requests[security]' on your system for me?

from blenderupdater.

 avatar commented on August 14, 2024

Don't worry, something's wrong with my system. It's not a software bug.

from blenderupdater.

tobkum avatar tobkum commented on August 14, 2024

Alright, closing this issue. Thanks!

from blenderupdater.

tobkum avatar tobkum commented on August 14, 2024

fixed, thanks!!!

from blenderupdater.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.