Skip to content

Add check update dialog#229

Open
StephenNneji wants to merge 1 commit into
RascalSoftware:mainfrom
StephenNneji:check_update_dialog
Open

Add check update dialog#229
StephenNneji wants to merge 1 commit into
RascalSoftware:mainfrom
StephenNneji:check_update_dialog

Conversation

@StephenNneji

@StephenNneji StephenNneji commented May 27, 2026

Copy link
Copy Markdown
Contributor

Adds a check update dialog which can be used to check for software updates

As no RasCAL-2 releases exist, the check update dialog would always find no update but it is possible to test by changing the UPDATE_URL the example below will use the SScanSS releases

UPDATE_URL = 'https://api.github.com/repos/ISISNeutronMuon/SScanSS-2/releases/latest'

@StephenNneji StephenNneji force-pushed the check_update_dialog branch 3 times, most recently from f31f1c9 to ae0174e Compare June 1, 2026 10:08
@StephenNneji StephenNneji force-pushed the check_update_dialog branch from ae0174e to 28ee98f Compare June 8, 2026 08:50
@MikeSullivan7

Copy link
Copy Markdown
Collaborator

I've changed UPDATE_URL = 'https://api.github.com/repos/ISISNeutronMuon/SScanSS-2/releases/latest' but I get the following certification error:

ERROR - An error occurred while checking for updates
Traceback (most recent call last):
  File "C:\Users\ddb29996\RasCAL-2\rascal2\core\worker.py", line 30, in run
    result = self.func(*self._args)
  File "C:\Users\ddb29996\RasCAL-2\rascal2\dialogs\check_update_dialog.py", line 138, in check_helper
    with urllib.request.urlopen(UPDATE_URL) as response:
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\urllib\request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\urllib\request.py", line 519, in open
    response = self._open(req, data)
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\urllib\request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\urllib\request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\urllib\request.py", line 1317, in do_open
    h = http_class(host, timeout=req.timeout, **http_conn_args)
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\http\client.py", line 1422, in __init__
    context = ssl._create_default_https_context()
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\ssl.py", line 771, in create_default_context
    context.load_default_certs(purpose)
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\ssl.py", line 592, in load_default_certs
    self._load_windows_store_certs(storename, purpose)
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\ssl.py", line 584, in _load_windows_store_certs
    self.load_verify_locations(cadata=certs)
ssl.SSLError: [ASN1: NOT_ENOUGH_DATA] not enough data (_ssl.c:4040)
ERROR - An error occurred while checking for updates
Traceback (most recent call last):
  File "C:\Users\ddb29996\RasCAL-2\rascal2\core\worker.py", line 30, in run
    result = self.func(*self._args)
  File "C:\Users\ddb29996\RasCAL-2\rascal2\dialogs\check_update_dialog.py", line 138, in check_helper
    with urllib.request.urlopen(UPDATE_URL) as response:
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\urllib\request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\urllib\request.py", line 519, in open
    response = self._open(req, data)
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\urllib\request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\urllib\request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\urllib\request.py", line 1317, in do_open
    h = http_class(host, timeout=req.timeout, **http_conn_args)
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\http\client.py", line 1422, in __init__
    context = ssl._create_default_https_context()
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\ssl.py", line 771, in create_default_context
    context.load_default_certs(purpose)
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\ssl.py", line 592, in load_default_certs
    self._load_windows_store_certs(storename, purpose)
  File "C:\Users\ddb29996\AppData\Local\miniforge3\envs\rascal2\lib\ssl.py", line 584, in _load_windows_store_certs
    self.load_verify_locations(cadata=certs)
ssl.SSLError: [ASN1: NOT_ENOUGH_DATA] not enough data (_ssl.c:4040)

I dont know if this is a Windows issue or if its because my account is not certified to make requests to the SScanSS repo

@StephenNneji

Copy link
Copy Markdown
Contributor Author

Might be related to python/cpython#151504

@StephenNneji

Copy link
Copy Markdown
Contributor Author

This might already be fixed, please check if your python is on the latest bugfix 3.10.20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants