Project

General

Profile

Bug #2771

osmo-python-tests: No script named 'osmotestvty.py'

Added by laforge 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
-
Start date:
12/18/2017
Due date:
% Done:

100%

Spec Reference:

Description

laforge@nataraja%pts/34 (17:42) ~/projects/git/osmo-bsc > which osmotestvty.py
/usr/local/bin/osmotestvty.py
laforge@nataraja%pts/34 (17:42) ~/projects/git/osmo-bsc > osmotestvty.py
Traceback (most recent call last):
  File "/usr/local/bin/osmotestvty.py", line 4, in <module>
    __import__('pkg_resources').run_script('osmopython==0.0.5', 'osmotestvty.py')
  File "/home/laforge/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 742, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/laforge/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1489, in run_script
    raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'osmotestvty.py'

Related issues

Related to Cellular Network Infrastructure - Bug #2770: osmo-python-tests fails with both python-2.7 and 3.6 ?!? Closed 12/18/2017

History

#1 Updated by laforge 4 months ago

  • Related to Bug #2770: osmo-python-tests fails with both python-2.7 and 3.6 ?!? added

#2 Updated by msuraev 4 months ago

  • Status changed from New to In Progress

That's odd. Difference between path and pythonpath perhaps? I'll look into it.

#3 Updated by msuraev 4 months ago

Unable to reproduce it yet:

~/source/gsm/osmo-bsc % which osmotestvty.py
/home/max/.local/bin/osmotestvty.py

</pr~/source/gsm/osmo-bsc % osmotestvty.py                         
confpath ., workdir .
Running tests for specific VTY commands
Launch: ./src/osmo-bsc/osmo-bsc -c ./doc/examples/osmo-bsc/osmo-bsc.cfg from /home/max/source/gsm/osmo-bsc
Opening /dev/null
Launching: PWD=/home/max/source/gsm/osmo-bsc './src/osmo-bsc/osmo-bsc' '-c' './doc/examples/osmo-bsc/osmo-bsc.cfg'
Terminating took 2.679s
.Launch: ./src/osmo-bsc/osmo-bsc -c ./doc/examples/osmo-bsc/osmo-bsc.cfg from /home/max/source/gsm/osmo-bsc
Launching: PWD=/home/max/source/gsm/osmo-bsc './src/osmo-bsc/osmo-bsc' '-c' './doc/examples/osmo-bsc/osmo-bsc.cfg'
Terminating took 2.679s
.Launch: ./src/osmo-bsc/osmo-bsc -c ./doc/examples/osmo-bsc/osmo-bsc.cfg from /home/max/source/gsm/osmo-bsc
Launching: PWD=/home/max/source/gsm/osmo-bsc './src/osmo-bsc/osmo-bsc' '-c' './doc/examples/osmo-bsc/osmo-bsc.cfg'
Terminating took 2.679s
.
----------------------------------------------------------------------
Ran 3 tests in 10.535s

OK
e>

#4 Updated by msuraev 4 months ago

Could be the difference between local (--user) and global install. In the bug description it seems like there's mixture of both. I'll look into possible fix.

#5 Updated by msuraev 4 months ago

Could you please add output of following commands:

pip2 list|grep osmo
pip2 show osmopython
python2 setup.py install -n
python2 setup.py install --user -n
pip3 list|grep osmo
pip3 show osmopython
python3 setup.py install -n
python3 setup.py install --user -n

We can try to reinstall it using pip2 install --user ./ in latest master but I'm not sure this would help because I don't understand whatcaused the inconsistent install to begin with. How exactly the installation was performed?

#6 Updated by laforge 4 months ago

I installed the package like this:

$ python2 ./setup.py clean
$ python2 ./setup.py build
$ python2 ./setup.py install

and the same with python3.

The following script was insufficient to recover my systemn into a working state:

rm /usr/local/bin/osmo{testconfig,dumpdoc,testvty}.py
rm -rf ~/.local/lib/python*/site-packages/osmo* ~/.local/bin/osmo{testconfig,dumpdoc,testvty}.py
rm -rf /usr/local/lib/python*/dist-packages/osmopython*

However, after full removal of ~/.local/lib/python* and re-installation I could successfully execute the osmcom python scripts again. That's of course not the most elegant method, but I didn't have any important python modules installed as user.

#7 Updated by msuraev 4 months ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

#8 Updated by laforge 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF