Showing results for 
Search instead for 
Did you mean: 

Error running Genie after upgrade Pyats/Genie



It seems that after upgrading the pyats/genie to 19.8. I hit a bunch of errors when I run the "genie" shell command..The error keep saying it can't import the name "Csr1000vPatterns". I didn't encounter any error during the pip installation.


I also did a reinstall "pip install --ignore-installed pyats genie --user" but it didn't help....Any idea what when wrong?


Traceback (most recent call last):
File "/home/lion/.local/bin/genie", line 6, in <module>
from genie.cli.__main__ import main
File "src/genie/cli/", line 8, in init genie.cli.__main__
File "src/genie/cli/commands/", line 22, in init genie.cli.commands.learn
File "/home/lion/.local/lib/python3.6/site-packages/genie/conf/", line 19, in <module>
from .main import Genie
File "src/genie/conf/", line 4, in init genie.conf.main
File "/home/lion/.local/lib/python3.6/site-packages/genie/conf/base/", line 4, in <module>
from .device import Device
File "src/genie/conf/base/", line 11, in init genie.conf.base.device
File "/home/lion/.local/lib/python3.6/site-packages/genie/libs/parser/", line 16, in <module>
from .base import tcl_invoke_ats_cmd,\
File "/home/lion/.local/lib/python3.6/site-packages/genie/libs/parser/", line 17, in <module>
from genie.metaparser import MetaParser
File "/home/lion/.local/lib/python3.6/site-packages/genie/metaparser/", line 7, in <module>
from ._metaparser import *
File "src/genie/metaparser/", line 11, in init genie.metaparser._metaparser
File "/home/lion/.local/lib/python3.6/site-packages/unicon/", line 13, in <module>
File "src/unicon/core/", line 278, in unicon.core.pluginmanager.PluginManager.discover_builtin_plugins
File "/usr/lib/python3.6/importlib/", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/lion/.local/lib/python3.6/site-packages/unicon/plugins/iosxe/csr1000v/", line 4, in <module>
from .patterns import Csr1000vPatterns
ImportError: cannot import name 'Csr1000vPatterns'

My pip list of the pyats/genie are the latest 19.8:


pyats 19.8 
pyats.aereport 19.8 
pyats.aetest 19.8 
pyats.async 19.8 
pyats.connections 19.8 
pyats.datastructures 19.8 
pyats.easypy 19.8 
pyats.kleenex 19.8 
pyats.log 19.8 
pyats.results 19.8 
pyats.tcl 19.8 
pyats.topology 19.8 
pyats.utils 19.8 
genie 19.8 
genie.abstract 19.8 
genie.conf 19.8 
genie.harness 19.8 
genie.libs.conf 19.8 
genie.libs.filetransferutils 19.8 
genie.libs.ops 19.8 
genie.libs.parser 19.8 
genie.libs.sdk 19.8 
genie.libs.telemetry 19.8 
genie.metaparser 19.8 
genie.ops 19.8 
genie.parsergen 19.8 
genie.predcore 19.8 
genie.telemetry 19.8 
genie.trafficgen 19.8 
genie.utils 19.8






Hi choywy,

Although I haven't run into this particular problem there is some basic troubleshooting that I like to do when running into issues with pyats/Genie.


1. Am I in a python virtual environment?

2. Does the command "which python" show that my directory is in my virtual environment?

3. Does the command "python --version" correctly show Python v3?

4. Does the same error occur when I create a new virtual environment and run the command "pip install python[full]"


I usually get past errors by doing the 4th one. I play a lot with dependencies and often will break things by accident so tearing down the virtual environment and making a new one is super easy :)

*** Rate All Helpful Responses ***
Content for Community-Ad

This widget could not be displayed.