Latest emlidtool fails- Don't apt-get upgrade emlidtool to 1.03

While installing a new sd card for NavIO2+RPI3 pn Strecth (latest Emlid image) got a strange issue while sudo apt-get upgrade

Already did all the normal set-up (expand filesystem, set up US locale, reboot) and did the usual:

sudo apt-get update && sudo apt-get upgrade

and surprise while doing the upgrade I see there’s a new emlidtool 1.03. and it fails to install

Setting up emlidtool (1.0.3-1) …
Collecting emlidtool
Exception:
Traceback (most recent call last):
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 594, in urlopen
chunked=chunked)
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 350, in _make_request
self._validate_conn(conn)
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 837, in validate_conn
conn.connect()
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connection.py”, line 323, in connect
ssl_context=context)
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/ssl
.py", line 324, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File “/usr/lib/python3.5/ssl.py”, line 385, in wrap_socket
_context=self)
File “/usr/lib/python3.5/ssl.py”, line 760, in init
self.do_handshake()
File “/usr/lib/python3.5/ssl.py”, line 996, in do_handshake
self._sslobj.do_handshake()
File “/usr/lib/python3.5/ssl.py”, line 641, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/usr/lib/python3/dist-packages/pip/commands/install.py”, line 353, in run
wb.build(autobuilding=True)
File “/usr/lib/python3/dist-packages/pip/wheel.py”, line 749, in build
self.requirement_set.prepare_files(self.finder)
File “/usr/lib/python3/dist-packages/pip/req/req_set.py”, line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File “/usr/lib/python3/dist-packages/pip/req/req_set.py”, line 554, in _prepare_file
require_hashes
File “/usr/lib/python3/dist-packages/pip/req/req_install.py”, line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File “/usr/lib/python3/dist-packages/pip/index.py”, line 568, in _get_pages
page = self._get_page(location)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 792, in get_page
“Cache-Control”: “max-age=600”,
File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py”, line 501, in get
return self.request(‘GET’, url, **kwargs)
File “/usr/lib/python3/dist-packages/pip/download.py”, line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py”, line 488, in request
resp = self.send(prep, **send_kwargs)
File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py”, line 609, in send
r = adapter.send(request, **kwargs)
File “/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py”, line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/adapters.py”, line 423, in send
timeout=timeout
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 643, in urlopen
_stacktrace=sys.exc_info()[2])
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/retry.py”, line 315, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: ‘Retry’ and ‘int’

@george.staroselskiy

Adding a log of the install from the beginning

this breaks emlidtool

update_log.log (84.9 KB)

Could you please try
sudo pip3 uninstall emlidtool && sudo pip3 install -U emlidtool?

@george.staroselskiy doesn’t work :frowning:

pi@navio:~ $ sudo pip3 uninstall emlidtool
Cannot uninstall requirement emlidtool, not installed
pi@navio:~ $ sudo pip3 install -U emlidtool?
Invalid requirement: ‘emlidtool?’
Traceback (most recent call last):
File “/usr/share/python-wheels/packaging-16.8-py2.py3-none-any.whl/packaging/requirements.py”, line 90, in init
req = REQUIREMENT.parseString(requirement_string)
File “/usr/share/python-wheels/pyparsing-2.1.10-py2.py3-none-any.whl/pyparsing.py”, line 1617, in parseString
raise exc
File “/usr/share/python-wheels/pyparsing-2.1.10-py2.py3-none-any.whl/pyparsing.py”, line 1607, in parseString
loc, tokens = self._parse( instring, 0 )
File “/usr/share/python-wheels/pyparsing-2.1.10-py2.py3-none-any.whl/pyparsing.py”, line 1379, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File “/usr/share/python-wheels/pyparsing-2.1.10-py2.py3-none-any.whl/pyparsing.py”, line 3376, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File “/usr/share/python-wheels/pyparsing-2.1.10-py2.py3-none-any.whl/pyparsing.py”, line 1383, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File “/usr/share/python-wheels/pyparsing-2.1.10-py2.py3-none-any.whl/pyparsing.py”, line 3164, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected stringEnd (at char 9), (line:1, col:10)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/pip/req/req_install.py”, line 82, in init
req = Requirement(req)
File “/usr/share/python-wheels/packaging-16.8-py2.py3-none-any.whl/packaging/requirements.py”, line 94, in init
requirement_string[e.loc:e.loc + 8]))
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at “‘?’”

or even sudo pip3 install -U emlidtool

pi@navio:~ $ sudo pip3 install -U emlidtool
Collecting emlidtool
Exception:
Traceback (most recent call last):
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 594, in urlopen
chunked=chunked)
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 350, in _make_request
self._validate_conn(conn)
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 837, in validate_conn
conn.connect()
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connection.py”, line 323, in connect
ssl_context=context)
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/ssl
.py", line 324, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File “/usr/lib/python3.5/ssl.py”, line 385, in wrap_socket
_context=self)
File “/usr/lib/python3.5/ssl.py”, line 760, in init
self.do_handshake()
File “/usr/lib/python3.5/ssl.py”, line 996, in do_handshake
self._sslobj.do_handshake()
File “/usr/lib/python3.5/ssl.py”, line 641, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/usr/lib/python3/dist-packages/pip/commands/install.py”, line 353, in run
wb.build(autobuilding=True)
File “/usr/lib/python3/dist-packages/pip/wheel.py”, line 749, in build
self.requirement_set.prepare_files(self.finder)
File “/usr/lib/python3/dist-packages/pip/req/req_set.py”, line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File “/usr/lib/python3/dist-packages/pip/req/req_set.py”, line 554, in _prepare_file
require_hashes
File “/usr/lib/python3/dist-packages/pip/req/req_install.py”, line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File “/usr/lib/python3/dist-packages/pip/index.py”, line 568, in _get_pages
page = self._get_page(location)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File “/usr/lib/python3/dist-packages/pip/index.py”, line 792, in get_page
“Cache-Control”: “max-age=600”,
File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py”, line 501, in get
return self.request(‘GET’, url, **kwargs)
File “/usr/lib/python3/dist-packages/pip/download.py”, line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py”, line 488, in request
resp = self.send(prep, **send_kwargs)
File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py”, line 609, in send
r = adapter.send(request, **kwargs)
File “/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py”, line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File “/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/adapters.py”, line 423, in send
timeout=timeout
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py”, line 643, in urlopen
_stacktrace=sys.exc_info()[2])
File “/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/retry.py”, line 315, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: ‘Retry’ and ‘int’

This is extremely strange! Seems like you cannot reach the PyPi server. Try sudo pip install --use-mirrors emlidtool

Didn’t work either.

apt-get upgrade removed it and was unable to install the new version, so I’ve retried now again with sudo apt-get install emlidtool and managed to install

pi@navio:~ $ sudo apt-get install emlidtool
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  arm-none-eabi-gdb
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  emlidtool
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2,566 B of archives.
After this operation, 3,072 B of additional disk space will be used.
Selecting previously unselected package emlidtool.
(Reading database ... 99017 files and directories currently installed.)
Preparing to unpack .../emlidtool_1.0.3-1_all.deb ...
Cannot uninstall requirement emlidtool, not installed
Unpacking emlidtool (1.0.3-1) ...
Setting up emlidtool (1.0.3-1) ...
Collecting emlidtool
  Downloading https://www.piwheels.hostedpi.com/simple/emlidtool/emlidtool-1.0.3-py3-none-any.whl
Requirement already up-to-date: pyparsing==2.2.0 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Requirement already up-to-date: humanfriendly==2.4 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Requirement already up-to-date: coverage==4.4 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Requirement already up-to-date: navio2==0.1.5 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Requirement already up-to-date: packaging==16.8 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Requirement already up-to-date: pbr==3.1.1 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Requirement already up-to-date: pycparser==2.17 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Collecting progressbar2==3.34.3 (from emlidtool)
  Downloading progressbar2-3.34.3-py2.py3-none-any.whl
Requirement already up-to-date: urwid==1.3.1 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Requirement already up-to-date: six==1.10.0 in /usr/lib/python3/dist-packages (from emlidtool)
Requirement already up-to-date: spidev==3.2 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Requirement already up-to-date: smbus-cffi==0.5.1 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Requirement already up-to-date: termcolor==1.1.0 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Requirement already up-to-date: appdirs==1.4.3 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Requirement already up-to-date: cffi==1.10.0 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Requirement already up-to-date: coloredlogs==6.0 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Requirement already up-to-date: py==1.4.33 in /usr/local/lib/python3.5/dist-packages (from emlidtool)
Collecting python-utils>=2.1.0 (from progressbar2==3.34.3->emlidtool)
  Downloading python_utils-2.2.0-py2.py3-none-any.whl
Installing collected packages: python-utils, progressbar2, emlidtool
Successfully installed emlidtool-1.0.3 progressbar2-3.34.3 python-utils-2.2.0
pi@navio:~ $ sudo emlidtool 
emlidtool version: 1.0.3
Vendor: Emlid Limited
Product: Navio 2
Issue: Emlid 2017-09-22 94b6586ea415c117b57d0d9eed9fc2df0bf1bcfd
Kernel: 4.9.45-94f47ec-emlid-v7+
2017-11-20 20:18:27 navio root[1185] INFO lsm9ds1: Passed
2017-11-20 20:18:27 navio root[1185] INFO rcio_status_alive: Passed
2017-11-20 20:18:27 navio root[1185] INFO mpu9250: Passed
2017-11-20 20:18:27 navio root[1185] INFO gps: Passed
2017-11-20 20:18:27 navio root[1185] INFO adc: Passed
2017-11-20 20:18:27 navio root[1185] INFO ms5611: Passed
2017-11-20 20:18:27 navio root[1185] INFO pwm: Passed
emlidtool -h to get more help

But something is broken on the new emlidtool rcio

pi@navio:~ $ sudo emlidtool rcio check
There is an error while updating firmware.
Please make sure that you have chosen an appropriate one and try again

Is there anything specific to your network? Like maybe you use a VPN or something? But I’m glad you could download the package after all. Unfortunately, there’s little we can do.

Could you please share cat /sys/kernel/rcio/status/crc ?

And also sudo emlidtool rcio check -l which will print more info along the way.

Thanks @george.staroselskiy

There are no issues on my home networking (no VPN) and I can replicate this behaviour consistently when I flash a new sd card with the Stretch image emlid-raspbian-20170922

Also no issue from the microSD cards because already tried a few different ones.

edit:Only thing from standard Raspberry PI3 on this RPI is that it has USB boot enabled

> pi@navio:~ $ cat /sys/kernel/rcio/status/crc
> 0xcaec2284
> pi@navio:~ $ sudo emlidtool rcio check -l
> long output
> There is an error while updating firmware.
> Please make sure that you have chosen an appropriate one and try again



pi@navio:~ $ sudo emlidtool test
2017-11-21 09:30:58 navio root[853] INFO ms5611: Passed
2017-11-21 09:30:58 navio root[853] INFO mpu9250: Passed
2017-11-21 09:30:58 navio root[853] INFO lsm9ds1: Passed
2017-11-21 09:30:58 navio root[853] INFO gps: Passed
2017-11-21 09:30:58 navio root[853] INFO adc: Passed
2017-11-21 09:30:58 navio root[853] INFO pwm: Passed
2017-11-21 09:30:58 navio root[853] INFO rcio_status_alive: Passed
pi@navio:~ $

I’m getting the same problem.

Did you find a solution?

This hit me last weekend and broke RCIO functionality, I thought I was going batty with nobody mentioning it on the forums so it must’ve been something I was doing wrong. Everything else worked great - connectivity was good, no issues with cloning from github, upgrading other packages, etc. Emlidtool ended up uninstalled, and trying to start up ardupilot by hand gave me no RCIO functionality.

Today I reverted down to the older version by downloading the wheel from pypi and only by using emlidtool to stop everything, run diagnostics (not sure what special that does past looking in sysfs - maybe it modprobe’s modules that could be missing?), and everything started up fine.

I thought I was seeing apparitions when doing what I thought was the same thing as emlidtool (turning services on, checking sysfs, etc) failed repeatedly to get RCIO working last weekend. Glad it wasn’t all just me.

Using the older version of emlidtool downloaded manually was a good workaround.

Guys, could you try sudo pip3 install -U emlidtool one more time?

This topic was automatically closed after 100 days. New replies are no longer allowed.