docker-archive / docker-registry

This is **DEPRECATED**! Please go to https://github.com/docker/distribution
Apache License 2.0
2.88k stars 879 forks source link

'module' object has no attribute 'Storage' #919

Closed pyotr777 closed 9 years ago

pyotr777 commented 9 years ago

Hi, I'm developing a new backend for docker registry. When I run nosetests I get lots of these errors:

======================================================================
ERROR: tests.test_all_installed_drivers.TestDrivertestjson.test_empty_after_remove_list_directory
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 381, in setUp
    try_run(self.inst, ('setup', 'setUp'))
  File "/usr/local/lib/python2.7/site-packages/nose/util.py", line 470, in try_run
    return func()
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docker_registry/testing/driver.py", line 40, in setUp
    storage = driver.fetch(self.scheme)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docker_registry/core/driver.py", line 269, in fetch
    module.Storage.scheme = name
AttributeError: 'module' object has no attribute 'Storage'
-------------------- >> begin captured stdout << ---------------------
Read JSON from /pathtomystorage/git_storage/images/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/json
container_config=
{u'AttachStderr': False,
 u'AttachStdin': False,
 u'AttachStdout': False,
 u'Cmd': None,
 u'CpuShares': 0,
 u'Dns': None,
 u'Env': None,
 u'Hostname': u'',
 u'Image': u'',
 u'Memory': 0,
 u'MemorySwap': 0,
 u'OpenStdin': False,
 u'PortSpecs': None,
 u'StdinOnce': False,
 u'Tty': False,
 u'User': u'',
 u'Volumes': None,
 u'VolumesFrom': u''}
CMD=None

--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
docker_registry.core.driver: DEBUG: Will return docker-registry.drivers.testjson.Storage
--------------------- >> end captured logging << ---------------------

The errors are in core driver code. What could be the cause for these errors?

I moved this question from this thread https://github.com/docker/docker-registry/issues/602 to make it a new issue.

pyotr777 commented 9 years ago

Removed unnecessary files and the errors have gone.