getmoto / moto

A library that allows you to easily mock out tests based on AWS infrastructure.
http://docs.getmoto.org/en/latest/
Apache License 2.0
7.6k stars 2.03k forks source link

Standalone server mode broken #469

Closed chrishenry closed 8 years ago

chrishenry commented 8 years ago

After a fresh pip install, attempting to run the server results in a stack trace.

→ pip install moto

→ which moto_server
/usr/local/bin/moto_server

→ moto_server ec2
Traceback (most recent call last):
  File "/usr/local/bin/moto_server", line 7, in <module>
    from moto.server import main
  File "/usr/local/lib/python2.7/site-packages/moto/__init__.py", line 9, in <module>
    from .cloudformation import mock_cloudformation  # flake8: noqa
  File "/usr/local/lib/python2.7/site-packages/moto/cloudformation/__init__.py", line 2, in <module>
    from .models import cloudformation_backends
  File "/usr/local/lib/python2.7/site-packages/moto/cloudformation/models.py", line 7, in <module>
    from .parsing import ResourceMap, OutputMap
  File "/usr/local/lib/python2.7/site-packages/moto/cloudformation/parsing.py", line 7, in <module>
    from moto.datapipeline import models as datapipeline_models
  File "/usr/local/lib/python2.7/site-packages/moto/datapipeline/__init__.py", line 2, in <module>
    from .models import datapipeline_backends
  File "/usr/local/lib/python2.7/site-packages/moto/datapipeline/models.py", line 148, in <module>
    for region in boto.datapipeline.regions():
AttributeError: 'module' object has no attribute 'regions'
spulec commented 8 years ago

Which version of boto are you using?

chrishenry commented 8 years ago

Hope you had a good Thanksgiving!

This was a fresh install of moto via pip install moto. Here's my pip freeze output.

○ → pip freeze  |grep boto
15:boto==2.23.0
16:boto3==1.2.1
17:botocore==1.3.5

○ → pip freeze  |grep moto
38:moto==0.4.19

However, I did notice that running the server in a virtualenv with boto 2.34.0 worked. This was a fresh clone of moto at master HEAD.

spulec commented 8 years ago

Thanks.

It looks like moto just requires a newer version of boto now. A fresh install should be fixed with the next release.