Problems with S3 in boto 2.0b1

597 views
Skip to first unread message

Christian Baun

unread,
Aug 11, 2010, 9:41:03 AM8/11/10
to boto-users
Hi,

I want to upgrade vom boto 1.9b to 2.0b1.

This code is working for me in 1.9b without problems:

calling_format=boto.s3.connection.OrdinaryCallingFormat()
conn_s3 = boto.s3.Connection(aws_access_key_id=accesskey,
aws_secret_access_key=secretaccesskey,
is_secure=False,
host="s3.amazonaws.com",
calling_format=calling_format,
path="/")

But with 2.0b1 I have this output:

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

I changed the boto.s3.Connection to boto.s3.connection and the result is this output:

TypeError: 'module' object is not callable

Is this a known issue? What can I do to solve this?

Best Regards,
Christian

Mitchell Garnaat

unread,
Aug 11, 2010, 11:11:56 AM8/11/10
to boto-...@googlegroups.com
Could you include the full stack trace you are getting?  Thanks,

Mitch


--
You received this message because you are subscribed to the Google Groups "boto-users" group.
To post to this group, send email to boto-...@googlegroups.com.
To unsubscribe from this group, send email to boto-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/boto-users?hl=en.


Mitchell Garnaat

unread,
Aug 11, 2010, 11:15:03 AM8/11/10
to boto-...@googlegroups.com
The following seems to work for me:

In [3]: import boto.s3.connection

In [4]: calling_format=boto.s3.connection.OrdinaryCallingFormat()

In [5]: c = boto.s3.connection.S3Connection(calling_format=calling_format)

Mitch

Christian Baun

unread,
Aug 11, 2010, 11:16:06 AM8/11/10
to boto-...@googlegroups.com, Mitchell Garnaat
Hi Mitch,

this is the output.

Traceback (most recent call last):
File "/home/baun/Google_AppEngine/google_appengine/google/appengine/ext/webapp/__init__.py", line 511, in __call__
handler.get(*groups)
File "/home/baun/workspace/koalacloud/s3/S3.py", line 75, in get
conn_s3 = logins3(username)
File "/home/baun/workspace/koalacloud/library.py", line 327, in logins3
conn_s3 = boto.s3.Connection(aws_access_key_id=accesskey,


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

Best Regards,
Christian

> > boto-users+...@googlegroups.com<boto-users%2Bunsu...@googlegroups.com>

Chris Moyer

unread,
Aug 11, 2010, 11:19:25 AM8/11/10
to boto-...@googlegroups.com, Mitchell Garnaat
note your last line:

boto.s3.Connection

should be:

boto.s3.connection.Connection.

> To unsubscribe from this group, send email to boto-users+...@googlegroups.com.


> For more options, visit this group at http://groups.google.com/group/boto-users?hl=en.
>
>

--
Chris Moyer

Christian Baun

unread,
Aug 11, 2010, 11:32:47 AM8/11/10
to boto-...@googlegroups.com
Hi Chris,

This is working. :-(

calling_format=boto.s3.connection.OrdinaryCallingFormat()
conn_s3 = boto.s3.connection.Connection(aws_access_key_id=accesskey,


aws_secret_access_key=secretaccesskey,
is_secure=False,
host="s3.amazonaws.com",
calling_format=calling_format,
path="/")

The output is:

Traceback (most recent call last):
File "/home/baun/Google_AppEngine/google_appengine/google/appengine/ext/webapp/__init__.py", line 511, in __call__
handler.get(*groups)
File "/home/baun/workspace/koalacloud/s3/S3.py", line 75, in get
conn_s3 = logins3(username)
File "/home/baun/workspace/koalacloud/library.py", line 327, in logins3

conn_s3 = boto.s3.connection.Connection(aws_access_key_id=accesskey,


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

Best Regards,
Christian

Christian Baun

unread,
Aug 11, 2010, 11:35:35 AM8/11/10
to boto-...@googlegroups.com, Mitchell Garnaat
Sorry.
This is the correct output:

Traceback (most recent call last):
File "/home/baun/Google_AppEngine/google_appengine/google/appengine/ext/webapp/__init__.py", line 511, in __call__
handler.get(*groups)
File "/home/baun/workspace/koalacloud/s3/S3.py", line 75, in get
conn_s3 = logins3(username)

File "/home/baun/workspace/koalacloud/library.py", line 334, in logins3
path="/")


TypeError: 'module' object is not callable


calling_format=boto.s3.connection.OrdinaryCallingFormat()
conn_s3 = boto.s3.connection(aws_access_key_id=accesskey,


aws_secret_access_key=secretaccesskey,
is_secure=False,
host="s3.amazonaws.com",
calling_format=calling_format,
path="/")

Best Regards,
Christian


Am Mittwoch, 11. August 2010 schrieb Mitchell Garnaat:

> > boto-users+...@googlegroups.com<boto-users%2Bunsu...@googlegroups.com>

Chris Moyer

unread,
Aug 11, 2010, 11:35:49 AM8/11/10
to boto-...@googlegroups.com
Right, sorry should have been:

boto.s3.connection.S3Connection

Christian Baun

unread,
Aug 11, 2010, 11:43:43 AM8/11/10
to boto-...@googlegroups.com, Chris Moyer
That's it !!! :-)

Thank's a lot Chris.

mitch

unread,
Aug 11, 2010, 11:51:40 AM8/11/10
to boto-users
boto/s3/__init__.py used to contain this:

import boto
from connection import S3Connection as Connection
from key import Key
from bucket import Bucket

__all__ = [Connection, Key, Bucket]

I removed that recently (and in a couple of other modules as well)
because I thought it was confusing and unnecessary. But that explains
why it used to work.

Mitch

On Aug 11, 11:43 am, Christian Baun <c...@unix-ag.uni-kl.de> wrote:
> That's it !!! :-)
>
> Thank's a lot Chris.
>
> Best Regards,
>    Christian
>
> Am Mittwoch, 11. August 2010 schrieb Chris Moyer:
>
>
>
> > Right, sorry should have been:
>
> > boto.s3.connection.S3Connection
>
> > On Wed, Aug 11, 2010 at 11:32 AM, Christian Baun <c...@unix-ag.uni-kl.de> wrote:
> > > Hi Chris,
>
> > > This is working. :-(
>
> > >      calling_format=boto.s3.connection.OrdinaryCallingFormat()
> > >      conn_s3 = boto.s3.connection.Connection(aws_access_key_id=accesskey,
> > >                                        aws_secret_access_key=secretaccesskey,
> > >                                        is_secure=False,
> > >                                        host="s3.amazonaws.com",
> > >                                        calling_format=calling_format,
> > >                                        path="/")
>
> > > The output is:
>
> > > Traceback (most recent call last):
> > >  File "/home/baun/Google_AppEngine/google_appengine/google/appengine/ext/webapp/_ _init__.py", line 511, in __call__
> > >    handler.get(*groups)
> > >  File "/home/baun/workspace/koalacloud/s3/S3.py", line 75, in get
> > >    conn_s3 = logins3(username)
> > >  File "/home/baun/workspace/koalacloud/library.py", line 327, in logins3
> > >    conn_s3 = boto.s3.connection.Connection(aws_access_key_id=accesskey,
> > > AttributeError: 'module' object has no attribute 'Connection'
>
> > > Best Regards,
> > >   Christian
>
> > > Am Mittwoch, 11. August 2010 schrieb Chris Moyer:
> > >> note your last line:
>
> > >> boto.s3.Connection
>
> > >> should be:
>
> > >> boto.s3.connection.Connection.
>
> > >> On Wed, Aug 11, 2010 at 11:16 AM, Christian Baun <c...@unix-ag.uni-kl.de> wrote:
> > >> > Hi Mitch,
>
> > >> > this is the output.
>
> > >> > Traceback (most recent call last):
> > >> >  File "/home/baun/Google_AppEngine/google_appengine/google/appengine/ext/webapp/_ _init__.py", line 511, in __call__
> > >> >    handler.get(*groups)
> > >> >  File "/home/baun/workspace/koalacloud/s3/S3.py", line 75, in get
> > >> >    conn_s3 = logins3(username)
> > >> >  File "/home/baun/workspace/koalacloud/library.py", line 327, in logins3
> > >> >    conn_s3 = boto.s3.Connection(aws_access_key_id=accesskey,
> > >> > AttributeError: 'module' object has no attribute 'Connection'
>
> > >> > Best Regards,
> > >> >   Christian
>
> > >> > Am Mittwoch, 11. August 2010 schrieb Mitchell Garnaat:
> > >> >> Could you include the full stack trace you are getting?  Thanks,
>
> > >> >> Mitch
>
> > >> >> On Wed, Aug 11, 2010 at 9:41 AM, Christian Baun <c...@unix-ag.uni-kl.de>wrote:
>
> > >> >> > Hi,
>
> > >> >> > I want to upgrade vom boto 1.9b to 2.0b1.
>
> > >> >> > This code is working for me in 1.9b without problems:
>
> > >> >> >      calling_format=boto.s3.connection.OrdinaryCallingFormat()
> > >> >> >      conn_s3 = boto.s3.Connection(aws_access_key_id=accesskey,
>
> > >> >> >  aws_secret_access_key=secretaccesskey,
> > >> >> >                                        is_secure=False,
> > >> >> >                                        host="s3.amazonaws.com",
> > >> >> >                                        calling_format=calling_format,
> > >> >> >                                        path="/")
>
> > >> >> > But with 2.0b1 I have this output:
>
> > >> >> > AttributeError: 'module' object has no attribute 'Connection'
>
> > >> >> > I changed the boto.s3.Connection to boto.s3.connection and the result is
> > >> >> > this output:
>
> > >> >> > TypeError: 'module' object is not callable
>
> > >> >> > Is this a known issue? What can I do to solve this?
>
> > >> >> > Best Regards,
> > >> >> >  Christian
>
> > >> >> > --
> > >> >> > You received this message because you are subscribed to the Google Groups
> > >> >> > "boto-users" group.
> > >> >> > To post to this group, send email to boto-...@googlegroups.com.
> > >> >> > To unsubscribe from this group, send email to
> > >> >> > boto-users+...@googlegroups.com<boto-users%2Bunsubscribe@googlegrou ps.com>
> > >> >> > .
> > >> >> > For more options, visit this group at
> > >> >> >http://groups.google.com/group/boto-users?hl=en.
>
> > >> > --
> > >> > You received this message because you are subscribed to the Google Groups "boto-users" group.
> > >> > To post to this group, send email to boto-...@googlegroups.com.
> > >> > To unsubscribe from this group, send email to boto-users+...@googlegroups.com.
> > >> > For more options, visit this group athttp://groups.google.com/group/boto-users?hl=en.
Reply all
Reply to author
Forward
0 new messages