Failed to update ChipWhisperer to 5.6.1 on offline computer

Hi everyone,

I had to update the ChipWhisperer version from 5.5.2 to 5.6.1 on a Windows 10 computer which does not have an Internet access. I had downloaded the latest releases from the GitHub page for that purpose.

I don’t know if it’s relevant to my actual problem but the installation worked well until it had to install libusb1 through pip. The installation understandably failed and import chipwhisperer threw an error because of that. So what I did was run pip download libusb1 somewhere with Internet and run pip install --no-index --find-links [...] on the ChipWhisperer bash with the files downloaded. This seemed to have worked well.

However now when I try to import chipwhisperer on Jupyter, the command just freezes. When I interrupt it, I get the following trace which shows a dead lock when running the command check_for_updates() probably due to the lack of Internet access:


KeyboardInterrupt Traceback (most recent call last)
in
----> 1 import chipwhisperer

c:\chipwhisperer5_64\cw\home\portable\chipwhisperer\software\chipwhisperer_init_.py in
71
72 try:
—> 73 check_for_updates()
74 except Exception as e:
75 other_logger.warning(“Could not check ChipWhisperer version, error {}”.format(e))

c:\chipwhisperer5_64\cw\home\portable\chipwhisperer\software\chipwhisperer_init_.py in check_for_updates()
52
53 latest_version = str(subprocess.run([sys.executable, ‘-m’, ‘pip’, ‘install’, ‘{}==random’.format(“chipwhisperer”)],
—> 54 capture_output=True, text=True, check=False))
55 if not latest_version:
56 raise IOError(“Could not check chipwhisperer version”)

~\WPy64-3771\python-3.7.7.amd64\lib\subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
488 with Popen(*popenargs, **kwargs) as process:
489 try:
→ 490 stdout, stderr = process.communicate(input, timeout=timeout)
491 except TimeoutExpired as exc:
492 process.kill()

~\WPy64-3771\python-3.7.7.amd64\lib\subprocess.py in communicate(self, input, timeout)
962
963 try:
→ 964 stdout, stderr = self._communicate(input, endtime, timeout)
965 except KeyboardInterrupt:

~\WPy64-3771\python-3.7.7.amd64\lib\subprocess.py in _communicate(self, input, endtime, orig_timeout)
1294 # calls communicate again.
1295 if self.stdout is not None:
→ 1296 self.stdout_thread.join(self._remaining_time(endtime))
1297 if self.stdout_thread.is_alive():
1298 raise TimeoutExpired(self.args, orig_timeout)

~\WPy64-3771\python-3.7.7.amd64\lib\threading.py in join(self, timeout)
1042
1043 if timeout is None:
→ 1044 self._wait_for_tstate_lock()
1045 else:
1046 # the behavior of a negative timeout isn’t documented, but

~\WPy64-3771\python-3.7.7.amd64\lib\threading.py in _wait_for_tstate_lock(self, block, timeout)
1058 if lock is None: # already determined that the C code is done
1059 assert self._is_stopped
→ 1060 elif lock.acquire(block, timeout):
1061 lock.release()
1062 self._stop()

KeyboardInterrupt:

Does anyone know what to do in this situation?? I don’t know if the error is related to my botched libusb1 install or if I had to specify somewhere that I don’t want updates?

Best regards

Hi,

This is just the version check we have not being able to reach the pypi servers. It should time out after a while, but I can push a commit that only tries the connection once.

EDIT: The newest commit only tries once before giving up. I’ve also reduced the timeout.

Alex