Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tutorial python examples/vww.py not work in python 3.8 #89

Open
xpsheng opened this issue Jun 12, 2023 · 1 comment
Open

tutorial python examples/vww.py not work in python 3.8 #89

xpsheng opened this issue Jun 12, 2023 · 1 comment

Comments

@xpsheng
Copy link

xpsheng commented Jun 12, 2023

Using Windows WSL setup, environment info like below:
Ubuntu 20.04.3 LTS (GNU/Linux 5.10.16.3-microsoft-standard-WSL2 x86_64)
python 3.8.10 by default.

Follow the related setup from tutorial
https://github.com/mit-han-lab/tinyengine/tree/main/tutorial/inference
There got following error.
Could tinyengine development pointout what's the problem there?
or current setup verify/support only in python 3.6 not for other newer version?

(tinyengine) sxp@JJ-S1:~/tinyengine$ python examples/vww.py
Downloading: "https://hanlab.mit.edu/projects/tinyml/mcunet/release/mcunet-5fps_vww.tflite" to /home/sxp/.torch/mcunet/mcunet-5fps_vww.tflite
Traceback (most recent call last):
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/urllib/request.py", line 1354, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/http/client.py", line 1007, in _send_output
self.send(msg)
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/http/client.py", line 947, in send
self.connect()
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/http/client.py", line 1421, in connect
self.sock = self._context.wrap_socket(self.sock,
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/sxp/tinyengine/mcunet/mcunet/utils/common_tools.py", line 104, in download_url
urlretrieve(url, cached_file)
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/urllib/request.py", line 247, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/urllib/request.py", line 1397, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/home/sxp/miniconda3/envs/tinyengine/lib/python3.8/urllib/request.py", line 1357, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "examples/vww.py", line 25, in
tflite_path = download_tflite(net_id="mcunet-vww1")
File "/home/sxp/tinyengine/mcunet/mcunet/model_zoo.py", line 91, in download_tflite
return download_url(tflite_url) # the file path of the downloaded tflite model
File "/home/sxp/tinyengine/mcunet/mcunet/utils/common_tools.py", line 108, in download_url
os.remove(os.path.join(model_dir, 'download.lock'))
FileNotFoundError: [Errno 2] No such file or directory: '/home/sxp/.torch/mcunet/mcunet-5fps_vww.tflite/download.lock'

image

@keltonlee
Copy link

Hello, I have the same problem now, did you solve this?

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

No branches or pull requests

2 participants