BerkeleyAutomation / dex-net

Repository for reading the Dex-Net 2.0 HDF5 database of 3D objects, parallel-jaw grasps, and robust grasp metrics
https://berkeleyautomation.github.io/dex-net/code.html
Other
296 stars 97 forks source link

Installation issue " 'module' object has no attribute 'learning_test' " #15

Open benzben opened 6 years ago

benzben commented 6 years ago

After installation, testing with

"python setup.py test"

gives me the error

AttributeError: 'module' object has no attribute 'learning_test'

and I'm not able to start the dexnet CLI. Do you know how I can fix this? I'm using Ubuntu 16 and have Python 2.7.11+

Thank you very much in advance!

The full output of "python setup.py test" is giving me: running test running egg_info writing requirements to src/dex_net.egg-info/requires.txt writing src/dex_net.egg-info/PKG-INFO writing top-level names to src/dex_net.egg-info/top_level.txt writing dependency_links to src/dex_net.egg-info/dependency_links.txt reading manifest file 'src/dex_net.egg-info/SOURCES.txt' writing manifest file 'src/dex_net.egg-info/SOURCES.txt' running build_ext Traceback (most recent call last): File "setup.py", line 42, in test_suite='test' File "/usr/local/lib/python2.7/dist-packages/setuptools/init.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/dist-packages/setuptools/command/test.py", line 226, in run self.run_tests() File "/usr/local/lib/python2.7/dist-packages/setuptools/command/test.py", line 248, in run_tests exit=False, File "/usr/lib/python2.7/unittest/main.py", line 94, in init self.parseArgs(argv) File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs self.createTests() File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests self.module) File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames suites = [self.loadTestsFromName(name, module) for name in names] File "/usr/lib/python2.7/unittest/loader.py", line 103, in loadTestsFromName return self.loadTestsFromModule(obj) File "/usr/local/lib/python2.7/dist-packages/setuptools/command/test.py", line 52, in loadTestsFromModule tests.append(self.loadTestsFromName(submodule)) File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName parent, obj = obj, getattr(obj, part) AttributeError: 'module' object has no attribute 'learning_test'

Achllle commented 6 years ago

Same issue here

EDIT: instead run pip install -e ".[test]"

source

jeffmahler commented 6 years ago

@Achllle Thanks for the suggestion!

@benzben Very sorry for missing this! In general this is due to an import error, usually from broken dependency. You can see the stack trace if you run the tests manually:

python test/learning_test.py

This is usually enough to debug any dependency issues.

fbottarel commented 6 years ago

I am running into similar issues here. When running

python setup.py test

I'm getting a trace very similar to what @benzben is getting, although my AttributeError is caused by

module object has no attribute grasping_test.

Running the test individually via python test/grasping_test.py causes an

ImportError: no module named traitlets.config.application.

jeffmahler commented 5 years ago

@fbottarel Ok that is helpful. Do you have packaged traitlets installed?