Automatically download the newest daily build

TaPol

New member
Hi, not sure if this is a my end issue since the latest system updates took place, but I am receiving the following log when attempting to run the updater. Any assistance is gratefully received. Thanks so much. TaPol =)

13/11/2020 2:37:07 PM
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
An error occurred while downloading data from http://ci.kolmafia.us/
Exception Message: The request was aborted: Could not create SSL/TLS secure channel.
 

MCroft

Developer
Hi, not sure if this is a my end issue since the latest system updates took place, but I am receiving the following log when attempting to run the updater. Any assistance is gratefully received. Thanks so much. TaPol =)

13/11/2020 2:37:07 PM
Checking http://ci.kolmafia.us/ for the latest version of KoLMafia...
An error occurred while downloading data from http://ci.kolmafia.us/
Exception Message: The request was aborted: Could not create SSL/TLS secure channel.
This was supposed to be fixed by Matt's changes in this post: https://kolmafia.us/threads/automatically-download-the-newest-daily-build.2856/page-8#post-160053

Can you make sure you've got that version and retry?
 

matt.chugg

Moderator
This was supposed to be fixed by Matt's changes in this post: https://kolmafia.us/threads/automatically-download-the-newest-daily-build.2856/page-8#post-160053

Can you make sure you've got that version and retry?

Definitly not the correct version, the correct version has https in the error message url.

An error occurred while downloading data from http://ci.kolmafia.us/ <-- old
An error occurred while downloading data from https://ci.kolmafia.us/ <-- new

(although I missed the one on line 106, but not going to recompile just for that)


** EDIT **

Post #158 updated

Fixed all occurences of urls in logging to https
Bumped the assembly number to 1.2
Added assembly number to log output
 
Last edited:

TaPol

New member
Definitly not the correct version, the correct version has https in the error message url.

An error occurred while downloading data from http://ci.kolmafia.us/ <-- old
An error occurred while downloading data from https://ci.kolmafia.us/ <-- new

(although I missed the one on line 106, but not going to recompile just for that)


** EDIT **

Post #158 updated

Fixed all occurences of urls in logging to https
Bumped the assembly number to 1.2
Added assembly number to log output
Thanks so much for replying so quickly, really appreciate it. I had downloaded the new files, but had forgotten to delete the .txt from the ends. Now that's done it appears to be working perfectly. Thanks again, TaPol =D
 

Rinn

Developer
If you want something simpler here's my update python script (requires wget atm, but that could be changed)

Code:
"""Updates KolMafia"""
import os
import sys
import json
import urllib.request
import urllib.error
import urllib.parse

def main():
    """Main entry point"""
    last_url = r'https://ci.kolmafia.us/job/Kolmafia/lastSuccessfulBuild'
    json_url = r'%s/api/json/' % last_url
    print('Reading %s' % json_url)
    page = urllib.request.Request(json_url, headers={'User-Agent': 'Mozilla/5.0'})
    response = urllib.request.urlopen(page)
    body = response.read().decode('ISO-8859-1')
    json_data = json.loads(body)
    jar_url = r'%s/artifact/%s' % (last_url, json_data['artifacts'][0]['relativePath'])
    print('Downloading %s' % json_url)
    print('\n')
    return os.system(r'wget -nc %s' % jar_url)

if __name__ == "__main__":
    sys.exit(main())
 
Top