Hi,
Just wondering why running import chipwhisperer as cw takes so long? Somtimes up to five minutes. Any way to speed it up?
Thanks,
Michael
Hi Michael,
I’m wondering if this is the version check that’s done on startup. Can you try commenting out
try:
check_for_updates()
except Exception as e:
other_logger.warning("Could not check ChipWhisperer version, error {}".format(e))
in chipwhisperer/software/chipwhisperer/__init__.py
?
Hi Alex,
Yes, thanks, commenting out those lines makes it run instantly.
Michael
Good to hear that worked out for you. There’s supposed to be a timeout in pip
that only lasts a few seconds, but it doesn’t seem to work properly. A future update should have a better timeout via subprocess, or maybe an async update check instead.
Yes that would be useful. There are several of us in the same group at work that are working with this and I’m sure they will be happy to learn this solution.
I’ve tried the solution you provided, and it gave me this:
Traceback (most recent call last):
File “/home/engt/chipwhisperer/software/chipwhisperer/init.py”, line 12, in
check_for_updates()
NameError: name ‘check_for_updates’ is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/engt/chipwhisperer/software/chipwhisperer/init.py”, line 14, in
other_logger.warning(“Could not check ChipWhisperer version, error {}”.format(e))
NameError: name ‘other_logger’ is not defined
Error in sys.excepthook:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/apport_python_hook.py”, line 72, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File “/usr/lib/python3/dist-packages/apport/init.py”, line 5, in
from apport.report import Report
File “/usr/lib/python3/dist-packages/apport/report.py”, line 32, in
import apport.fileutils
File “/usr/lib/python3/dist-packages/apport/fileutils.py”, line 28, in
from apport.packaging_impl import impl as packaging
File “/usr/lib/python3/dist-packages/apport/packaging_impl.py”, line 23, in
import apt
File “/usr/lib/python3/dist-packages/apt/init.py”, line 26, in
from apt.package import Package as Package, Version as Version
File “/usr/lib/python3/dist-packages/apt/package.py”, line 24, in
import logging
File “/home/engt/chipwhisperer/software/chipwhisperer/logging.py”, line 8, in
logging.basicConfig(level=logging.WARNING)
AttributeError: partially initialized module ‘logging’ has no attribute ‘basicConfig’ (most likely due to a circular import)
Original exception was:
Traceback (most recent call last):
File “/home/engt/chipwhisperer/software/chipwhisperer/init.py”, line 12, in
check_for_updates()
NameError: name ‘check_for_updates’ is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/engt/chipwhisperer/software/chipwhisperer/init.py”, line 14, in
other_logger.warning(“Could not check ChipWhisperer version, error {}”.format(e))
NameError: name ‘other_logger’ is not defined
I’m trying to upgrade the firmware, and it’s taken me forever.