google-code-export / django-syncr

Automatically exported from code.google.com/p/django-syncr
0 stars 0 forks source link

syncAllPhotoSets does not work, returns value error #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. f.syncRecentPhotos("username",days=30)
2. f.syncAllPhotoSets("username")

What is the expected output? 
Synchronization of Sets

What do you see instead?
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/syncr/app/flickr.py", line 443, in
syncAllPhotoSets
    self.syncPhotoSet(photoset['id'], i + 1)
  File "/usr/lib/python2.6/site-packages/syncr/app/flickr.py", line 406, in
syncPhotoSet
    'order': order
  File
"/usr/local/lib/python2.6/site-packages/django/db/models/manager.py", line
96, in get_or_create
  File "/usr/local/lib/python2.6/site-packages/django/db/models/query.py",
line 337, in get_or_create
  File "/usr/local/lib/python2.6/site-packages/django/db/models/base.py",
line 253, in __init__
  File
"/usr/local/lib/python2.6/site-packages/django/db/models/fields/related.py", 
line
264, in __set__
ValueError: Cannot assign "6L": "PhotoSet.primary" must be a "Photo" instance.

What version of the product are you using? On what operating system?
Downloaded from trunk on 15 feb (__version__ says 0.36, but that seems
faulty since changelog goes to v0.41)
openSUSE 11.1, using python 2.6 and Django 1.0.2

Please provide any additional information below.
Tried on serveral users, all returning same error/

Original issue reported on code.google.com by Prins...@gmail.com on 15 Feb 2009 at 9:57

GoogleCodeExporter commented 9 years ago
I've committed a new version of flickr.py in r70 that should resolve this 
problem. Test it out and let me know. 
Thank you !

Original comment by jesse.l...@gmail.com on 15 Feb 2009 at 2:41

GoogleCodeExporter commented 9 years ago
Man, you are fast. It hung the first time, but worked the second time:
>>> f.syncAllPhotoSets("snirpyor")
>>> from syncr.flickr.models import PhotoSet
>>> PhotoSet.objects.all()
[<PhotoSet: test photo set by snirpyor>, <PhotoSet: afslag photo set by 
snirpyor>]

Must have been the flickr server the first time. It works, but the admin end 
crashed.
Might be something I screwed up though. Here is the error i get when accessing 
the
PhotoSet table in admin, but will look into it myself:

http://dpaste.com/hold/120849/

Original comment by Prins...@gmail.com on 15 Feb 2009 at 3:11

GoogleCodeExporter commented 9 years ago
Dropped the tables related to photo and photoset and synchronized the model.
Synchronized with flickr to get a clean set of data. The above error in admin 
remains. 

Original comment by Prins...@gmail.com on 15 Feb 2009 at 3:23

GoogleCodeExporter commented 9 years ago
Comment #2 seems to be the same problem I'm having with PhotoSet table in admin 
(see
Issue 40). Here's my traceback:

http://dpaste.com/hold/121680/

Original comment by alasdair...@gmail.com on 17 Feb 2009 at 2:20

GoogleCodeExporter commented 9 years ago
@ comment 4:
I agree this is the same issue. It seems unrelated to this original issue #41. 
This
should be considered fixed and can be closed (thanks!). I'd recommend 
continuing on
issue #40.

Original comment by Prins...@gmail.com on 17 Feb 2009 at 5:02

GoogleCodeExporter commented 9 years ago
Closing this issue, but continuing the discussion under issue #40

Original comment by jesse.l...@gmail.com on 19 Feb 2009 at 3:56