Tinyprog --update-bootloader: certificate has expired error


#1

Hi all,

I recently got my TinyFPGA BX board and have been following the BX User Guide for a basic set-up. Everything worked for me up through the --update-bootloader step, at which I got the following:

TinyProg CLI
------------
Using device id 1d50:6130
Only one board with active bootloader, using it.

Traceback (most recent call last):
File “c:\users\thoma\appdata\local\programs\python\python39\lib\urllib\request.py”, line 1342, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File “c:\users\thoma\appdata\local\programs\python\python39\lib\http\client.py”, line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File “c:\users\thoma\appdata\local\programs\python\python39\lib\http\client.py”, line 1301, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “c:\users\thoma\appdata\local\programs\python\python39\lib\http\client.py”, line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “c:\users\thoma\appdata\local\programs\python\python39\lib\http\client.py”, line 1010, in _send_output
self.send(msg)
File “c:\users\thoma\appdata\local\programs\python\python39\lib\http\client.py”, line 950, in send
self.connect()
File “c:\users\thoma\appdata\local\programs\python\python39\lib\http\client.py”, line 1424, in connect
self.sock = self._context.wrap_socket(self.sock,
File “c:\users\thoma\appdata\local\programs\python\python39\lib\ssl.py”, line 500, in wrap_socket
return self.sslsocket_class._create(
File “c:\users\thoma\appdata\local\programs\python\python39\lib\ssl.py”, line 1040, in _create
self.do_handshake()
File “c:\users\thoma\appdata\local\programs\python\python39\lib\ssl.py”, line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1123)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “c:\users\thoma\appdata\local\programs\python\python39\lib\runpy.py”, line 197, in run_module_as_main
return run_code(code, main_globals, None,
File “c:\users\thoma\appdata\local\programs\python\python39\lib\runpy.py”, line 87, in run_code
exec(code, run_globals)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python39\Scripts\tinyprog.exe_main
.py", line 7, in
File "c:\users\thoma\appdata\local\programs\python\python39\lib\site-packages\tinyprog_main
.py", line 314, in main
perform_bootloader_update(port)
File "c:\users\thoma\appdata\local\programs\python\python39\lib\site-packages\tinyprog_main
.py", line 128, in perform_bootloader_update
bootloader_update_info = json.loads(urlopen(m[u"bootmeta"][u"update"] + “/bootloader.json”).read())
File “c:\users\thoma\appdata\local\programs\python\python39\lib\urllib\request.py”, line 214, in urlopen
return opener.open(url, data, timeout)
File “c:\users\thoma\appdata\local\programs\python\python39\lib\urllib\request.py”, line 517, in open
response = self._open(req, data)
File “c:\users\thoma\appdata\local\programs\python\python39\lib\urllib\request.py”, line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File “c:\users\thoma\appdata\local\programs\python\python39\lib\urllib\request.py”, line 494, in _call_chain
result = func(*args)
File “c:\users\thoma\appdata\local\programs\python\python39\lib\urllib\request.py”, line 1385, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File “c:\users\thoma\appdata\local\programs\python\python39\lib\urllib\request.py”, line 1345, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1123)>

I went on to follow the Atom installation and first project tutorial, but when uploading for blink_project through APIO, I got this message:

Activate bootloader by pressing the reset button
Error: board TinyFPGA-BX not connected

But when I ran tinyprog -l:

TinyProg CLI
------------
Using device id 1d50:6130
Only one board with active bootloader, using it.
Boards with active bootloaders:

    COM3: TinyFPGA BX 1.0.0
        UUID: 4629ddf3-e282-41d0-ab68-3b12c1fd8d2f
        FPGA: ice40lp8k-cm81

I’m a fairly inexperienced student hobbyist, so I’m honestly not sure how to proceed. I’m on Windows 10 with Python 3.9.1. Any help would be greatly appreciated!


#2

Update: Worked on this more and got the bootloader update working! I uninstalled Python 3.9.1 and installed 3.6.5 as per the instructions and redid all the installations from there.
Still am curious to know what’s wrong with using a later version of Python, but for now this seems to work okay.