Fatal exception after fresh Fedora install

After installing the yotta tools a bunch of times on a few computers, I ran into an issue on a new install. Seems I can’t do anything, because the pyasn1 library isn’t installed (or up to date).

[ericfoss@charlie blinky]$ sudo yotta search mbed
Fatal Exception, yotta=unknown
Traceback (most recent call last):
  File "/bin/yotta", line 4, in <module>
  File "/usr/lib/python2.7/site-packages/yotta/main.py", line 205, in main
    status = args.command(args, following_args)
  File "/usr/lib/python2.7/site-packages/yotta/search.py", line 125, in execCommand
    for result in itertools.islice(registry_access.search(query=args.query, keywords=args.kw, registry=args.registry), args.limit):
  File "/usr/lib/python2.7/site-packages/yotta/lib/registry_access.py", line 683, in search
    headers = _headersForRegistry(registry)
  File "/usr/lib/python2.7/site-packages/yotta/lib/registry_access.py", line 414, in _headersForRegistry
    'X-Yotta-Client-Version': _getYottaVersion(),
  File "/usr/lib/python2.7/site-packages/yotta/lib/registry_access.py", line 397, in _getYottaVersion
    _yotta_version = pkg_resources.require("yotta")[0].version
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 664, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 571, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (pyasn1 0.1.7 (/usr/lib/python2.7/site-packages), Requirement.parse('pyasn1>=0.1.8'))
[ericfoss@charlie blinky]$

A quick search told me to run

sudo pip install pyasn1 --upgrade

Which I did and it now works. Could this be missing from the install instructions?

Thanks for reporting – do you remember if pip reported any errors when you first installed yotta?

Not that I remember. I was on a cellular connection and it had some hiccups, but any time it failed I just reran the command and it would work fine.

OK thanks – if a pip command hadn’t completed correctly after being interrupted then that might well have caused this, so for now I think this is just a one-time glitch. However if the same/similar problem ever occurs again please add to this thread, or open an issue at https://github.com/armmbed/yotta/issues