Attribute error when recieving ShareChanged message
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu One Client |
Fix Released
|
High
|
John O'Brien | ||
Ubuntu One storage protocol |
Fix Released
|
High
|
John O'Brien | ||
ubuntuone-client (Ubuntu) |
Fix Released
|
High
|
Ubuntu One Client Engineering team | ||
Lucid |
Fix Released
|
High
|
Ubuntu One Client Engineering team | ||
ubuntuone-storage-protocol (Ubuntu) |
Fix Released
|
High
|
Ubuntu One Client Engineering team | ||
Lucid |
Fix Released
|
High
|
Ubuntu One Client Engineering team |
Bug Description
I deleted a share on the web, and got the following a few seconds later in the client:
2010-04-01 16:05:26,829 - ubuntuone.
2010-04-01 16:05:26,829 - ubuntuone.
Traceback (most recent call last):
File "/usr/lib/
method(*args, **kwargs)
File "/usr/lib/
self.
AttributeError: 'UUID' object has no attribute 'share_id
Related branches
- Guillermo Gonzalez: Approve
- Tim Cole (community): Approve
-
Diff: 166 lines (+94/-18)2 files modifiedtests/test_client.py (+59/-1)
ubuntuone/storageprotocol/client.py (+35/-17)
- Eric Casteleijn (community): Approve
- Rick McBride (community): Approve
-
Diff: 145 lines (+33/-28)5 files modifiedtests/syncdaemon/test_dbus.py (+2/-2)
tests/syncdaemon/test_vm.py (+4/-4)
ubuntuone/syncdaemon/action_queue.py (+8/-3)
ubuntuone/syncdaemon/event_queue.py (+2/-1)
ubuntuone/syncdaemon/volume_manager.py (+17/-18)
Changed in ubuntuone-storage-protocol: | |
assignee: | nobody → John O'Brien (jdobrien) |
importance: | Undecided → High |
status: | New → In Progress |
tags: | added: desktop+ package u1-lucid |
Changed in ubuntuone-client: | |
assignee: | nobody → John O'Brien (jdobrien) |
Changed in ubuntuone-client (Ubuntu): | |
status: | New → Triaged |
Changed in ubuntuone-client: | |
status: | New → In Progress |
milestone: | none → lucid-final |
Changed in ubuntuone-client (Ubuntu): | |
assignee: | nobody → Ubuntu One Desktop+ team (ubuntuone-desktop+) |
importance: | Undecided → High |
Changed in ubuntuone-storage-protocol (Ubuntu): | |
importance: | Undecided → High |
status: | New → Triaged |
assignee: | nobody → Ubuntu One Desktop+ team (ubuntuone-desktop+) |
Changed in ubuntuone-storage-protocol (Ubuntu): | |
milestone: | none → ubuntu-10.04 |
Changed in ubuntuone-client (Ubuntu): | |
milestone: | none → ubuntu-10.04 |
Changed in ubuntuone-client: | |
status: | In Progress → Fix Committed |
Changed in ubuntuone-storage-protocol: | |
status: | In Progress → Fix Committed |
Changed in ubuntuone-client: | |
status: | Fix Committed → Fix Released |
Changed in ubuntuone-storage-protocol: | |
status: | Fix Committed → Fix Released |
Changed in ubuntuone-client (Ubuntu Lucid): | |
status: | Triaged → Fix Committed |
Changed in ubuntuone-storage-protocol: | |
status: | Fix Released → Fix Committed |
milestone: | none → lucid-final |
Changed in ubuntuone-client (Ubuntu Lucid): | |
status: | Fix Committed → In Progress |
Changed in ubuntuone-client: | |
status: | Fix Released → Fix Committed |
Changed in ubuntuone-storage-protocol: | |
status: | Fix Committed → Fix Released |
Changed in ubuntuone-client: | |
status: | Fix Committed → Fix Released |
On 04/01/2010 04:09 PM, John O'Brien wrote: SyncDaemon. EQ - DEBUG - push_event: SV_SHARE_CHANGED, args:(), kw:{'info': UUID('eb16a306- 6875-460b- ad07-8f43ea9fbc 47'), 'message': 'deleted'} SyncDaemon. EQ - ERROR - Error encountered while handling: SV_SHARE_CHANGED in<ubuntuone. syncdaemon. volume_ manager. VolumeManager object at 0x33931d0> python2. 6/dist- packages/ ubuntuone/ syncdaemon/ event_queue. py", line 790, in _dispatch python2. 6/dist- packages/ ubuntuone/ syncdaemon/ volume_ manager. py", line 541, in handle_ SV_SHARE_ CHANGED debug(' share deleted! %s', info.share_id)
> Public bug reported:
>
> I deleted a share on the web, and got the following a few seconds later
> in the client:
>
> 2010-04-01 16:05:26,829 - ubuntuone.
> 2010-04-01 16:05:26,829 - ubuntuone.
> Traceback (most recent call last):
> File "/usr/lib/
> method(*args, **kwargs)
> File "/usr/lib/
> self.log.
> AttributeError: 'UUID' object has no attribute 'share_id
>
> ** Affects: ubuntuone-client
> Importance: Undecided
> Status: New
>
>
The error is caused because the client handler does not match what the
protocol sends to it. And the tests conform to what the client expects
and not what the protocol sends:
The protocol:
if msg.type == protocol_ pb2.Message. NOTIFY_ SHARE: NotifyShareHold er.load_ from_msg( msg.notify_ share)
self. _share_ change_ callback( "changed" , info) pb2.Message. SHARE_DELETED:
self. _share_ change_ callback( "deleted" ,
info =
sharersp.
elif msg.type == protocol_
uuid.UUID( msg.share_ deleted. share_id) )
The client: SV_SHARE_ CHANGED( self, message, info):
self. log.debug( "New share notification, share_id: %s",
info. share_id)
dir_ name = self._build_ share_path( info.share_ name,
info. from_visible_ name)
path = os.path. join(self. m.shares_ dir, dir_name)
share = Share.from_ notify_ holder( info, path)
self. add_share( share)
self. log.debug( 'share changed! %s', info.share_id)
self. share_changed( info)
self. log.debug( 'share deleted! %s', info.share_id)
self. share_deleted( str(info. share_id) )
def handle_
""" handle SV_SHARE_CHANGED event """
if message == 'changed':
if str(info.share_id) not in self.shares:
else:
elif message == 'deleted':