Closed lwijnsma closed 2 years ago
Which version of napalm
do you have ?
napalm==4.0.0
Which version of
napalm
do you have ?
Weird. Code works and it's tested on CI with python 3.8. Can you print out all attributes of Version
object ?
at https://github.com/napalm-automation-community/napalm-ros/blob/master/napalm_ros/ros.py#L345
print(dir(pkg_resources.get_distribution("napalm").parsed_version))
Weird. Code works and it's tested on CI with python 3.8. Can you print out all attributes of
Version
object ? at https://github.com/napalm-automation-community/napalm-ros/blob/master/napalm_ros/ros.py#L345print(dir(pkg_resources.get_distribution("napalm").parsed_version))
This is the output of that command:
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_compare', '_key', '_regex', '_version', 'base_version', 'is_postrelease', 'is_prerelease', 'local', 'public']
And this is the output of :
>>> print(pkg_resources.get_distribution("napalm").parsed_version)
4.0.0
parsed_version
should return Version object
e.g.
In [6]: ipy = pkg_resources.get_distribution('ipython')
In [7]: ipy
Out[7]: ipython 7.31.0 (/opt/homebrew/lib/python3.9/site-packages)
In [8]: ipy.version
Out[8]: '7.31.0'
In [9]: ipy.parsed_version
Out[9]: <Version('7.31.0')>
Try to upgrade setuptools
and pip
to newest versions.
Try to upgrade
setuptools
andpip
to newest versions.
pip was already on the latest version but upgrading setuptools from 44 to 65 did the trick. thank you for the help
Description of Issue/Question
When trying to use the
get_facts
call the python module throws anAttributeError
.Setup
(Router RB3011) <---> (Linux box with python and napalm)
napalm-ros version
ROS version
librouteros version
python version
Steps to Reproduce the Issue
Error Traceback