cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
268
Views
0
Helpful
1
Replies
Highlighted
Beginner

Error running Genie after upgrade Pyats/Genie

Hi,

 

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/__main__.py", line 8, in init genie.cli.__main__
File "src/genie/cli/commands/learn.py", line 22, in init genie.cli.commands.learn
File "/home/lion/.local/lib/python3.6/site-packages/genie/conf/__init__.py", line 19, in <module>
from .main import Genie
File "src/genie/conf/main.py", line 4, in init genie.conf.main
File "/home/lion/.local/lib/python3.6/site-packages/genie/conf/base/__init__.py", line 4, in <module>
from .device import Device
File "src/genie/conf/base/device.py", line 11, in init genie.conf.base.device
File "/home/lion/.local/lib/python3.6/site-packages/genie/libs/parser/__init__.py", line 16, in <module>
from .base import tcl_invoke_ats_cmd,\
File "/home/lion/.local/lib/python3.6/site-packages/genie/libs/parser/base.py", line 17, in <module>
from genie.metaparser import MetaParser
File "/home/lion/.local/lib/python3.6/site-packages/genie/metaparser/__init__.py", line 7, in <module>
from ._metaparser import *
File "src/genie/metaparser/_metaparser.py", line 11, in init genie.metaparser._metaparser
File "/home/lion/.local/lib/python3.6/site-packages/unicon/__init__.py", line 13, in <module>
__plugin_manager__.discover_builtin_plugins()
File "src/unicon/core/pluginmanager.py", line 278, in unicon.core.pluginmanager.PluginManager.discover_builtin_plugins
File "/usr/lib/python3.6/importlib/__init__.py", 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/service_statements.py", 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

 

 

 

 

1 REPLY 1
Highlighted
Beginner

Re: Error running Genie after upgrade Pyats/Genie

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 ***
This widget could not be displayed.