Closed beark007 closed 11 months ago
@beark007, it appears like you may have a python environment issue. The smarts.sstudio.types
is somehow overriding the standard python types
module.
Would you happen to somehow have added <SMARTS_REPO>/smarts/sstudio
to your PYTHONPATH
or PATH
environment variables?
If you try the python
interpreter, does <SMARTS_REPO>/smarts/sstudio
somehow show up in sys.path
before /usr/lib/python3.8
?
python
>>> import sys
>>> sys.path
>>> [os.path.abspath(p) for p in sys.path]
# example output
['/home/dev/repo/SMARTS', '/home/dev/anaconda3/lib/python39.zip', '/home/dev/anaconda3/lib/python3.9', '/home/dev/anaconda3/lib/python3.9/lib-dynload', '/home/dev/repo/SMARTS/.venv/lib/python3.9/site-packages', '/home/dev/repo/SMARTS/__editable__.smarts-1.4.0.finder.__path_hook__']
@beark007, it appears like you may have a python environment issue. The
smarts.sstudio.types
is somehow overriding the standard pythontypes
module.Would you happen to somehow have added
<SMARTS_REPO>/smarts/sstudio
to yourPYTHONPATH
orPATH
environment variables?If you try the
python
interpreter, does<SMARTS_REPO>/smarts/sstudio
somehow show up insys.path
before/usr/lib/python3.8
?python >>> import sys >>> sys.path >>> [os.path.abspath(p) for p in sys.path] # example output ['/home/dev/repo/SMARTS', '/home/dev/anaconda3/lib/python39.zip', '/home/dev/anaconda3/lib/python3.9', '/home/dev/anaconda3/lib/python3.9/lib-dynload', '/home/dev/repo/SMARTS/.venv/lib/python3.9/site-packages', '/home/dev/repo/SMARTS/__editable__.smarts-1.4.0.finder.__path_hook__']
print info: Python 3.8.10 (default, Nov 22 2023, 10:22:35) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.
import sys sys.path ['', '/home/XXX/SMARTS', '/home/XXX/nuplan-devkit', '/home/XXX/carla_0910/PythonAPI/carla/dist/carla-0.9.10-py3.7-linux-x86_64.egg', '/home/XXX/carla_0910/PythonAPI/carla/agents', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/XXX/.local/lib/python3.8/site-packages', '/home/XXX/d4rl', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages']
After installing the environment under a new python, it still fails to build the scenario.
I have never seen this error before and have not yet been able to reproduce the error for that commit. The system path is not suggesting anything. I am going to attempt to emulate the error and see if I can force the correct import order.
I have never seen this error before and have not yet been able to reproduce the error for that commit. The system path is not suggesting anything. I am going to attempt to emulate the error and see if I can force the correct import order.
Many thanks!
It appears like it may be related to Pycharm debug:
https://stackoverflow.com/a/68985644
What I might be able to do here is forcefully reload the module if types
is smarts.sstudio.types
when resolving through smarts.__init__.py
. This may not be possible because types
is a core module...
I think I am going to have to deprecate and rename smarts/sstudio/types.py
.
@beark007 I have merged in a fix that should resolve the issue.
High Level Description
1.install
2.build scenario
3.problem
Version
master commit:6ffa83fca9dda7
Operating System
Ubuntu 20.04
Problems
build scenario failed.
No response