General upload failure (3)

Skip to first unread message


Jun 10, 2008, 6:53:01 AM6/10/08
to Desktop Flickr Organizer
Hi there!

Love the tool, it's been an invaluable asset in uploading several GB
worth of photos to flickr. I've run into some problems though - some
photos don't seem to upload properly, and the only way I've gotten
around that so far is to remove them from my upload queue and
uploading them manually. This is obviously somewhat less desirable. :)

What happens on a problem picture is that I get the status bar message
that the picture is uploading, and from my network activity it seems
that the picture is getting uploaded. Once the upload "completes",
however, DFO silently fails and goes back to waiting on the next sync.
The picture never shows up in my photo stream.

To investigate this I checked out the latest source code and ran from
the console, and I ended up with the same problem. This time I had
console output however:

General upload failure (3)
at FlickrNet.Flickr.UploadPicture (System.IO.Stream stream,
System.String title, System.String description, System.String tags,
Int32 isPublic, Int32 isFamily, Int32 isFriend, ContentType
contentType, SafetyLevel safetyLevel, HiddenFromSearch
hiddenFromSearch) [0x00000]
at FlickrNet.Flickr.UploadPicture (System.String filename,
System.String title, System.String description, System.String tags,
Boolean isPublic, Boolean isFamily, Boolean isFriend) [0x00000]
at FlickrCommunicator.CheckPhotosToUpload () [0x00000]
at FlickrCommunicator.RoutineCheck () [0x00000]

Any ideas how to fix this problem?



Jun 10, 2008, 7:26:25 AM6/10/08
to Desktop Flickr Organizer
Another small follow up:

I ran into another bug. This one I could fix myself though. The
problem is as follows:

I added my blog to flickr via the web interface. My blog title
contains an apostrophe. When DFO downloads the blog information on
sync, this apostrophe causes a SQL error:

near "s": syntax error
at Mono.Data.SqliteClient.SqliteCommand.GetNextStatement (IntPtr
pzStart, System.IntPtr& pzTail, System.IntPtr& pStmt) [0x00000]
at Mono.Data.SqliteClient.SqliteCommand.ExecuteReader
(CommandBehavior behavior, Boolean want_results, System.Int32&
rows_affected) [0x00000]
at Mono.Data.SqliteClient.SqliteCommand.ExecuteNonQuery ()
at PersistentInformation.RunNonQuery (System.String query)
at PersistentInformation.InsertBlog (System.String blogid,
System.String blogtitle) [0x00000]
at FlickrCommunicator.UpdateBlogs () [0x00000]
at FlickrCommunicator.RoutineCheck () [0x00000]

I fixed this problem by sanitizing the blog title input before adding
it to the database. It's only a quick sanitation fix and by no means

In PersistentInformation.cs, line 1585:

public void InsertBlog(string blogid, string blogtitle) {
lock (_bloglock) {
"insert into blog (blogid, blogtitle) values ('{0}','{1}');",
blogid, blogtitle.Replace("'", "''")));

Hope that helps. :)


Jun 17, 2008, 3:40:59 AM6/17/08
to Desktop Flickr Organizer
Good catch - I just started playing with dfo, and filed debian bug
486304 on what is basically the same thing in
PersistentInformation.InsertPool; presumably all of those RunQuery's
need to be sanitized (or replaced with something that does real SQL
argument passing instead of String.Format? Some googling suggests
constructing an SqliteParameter object for this case... (I'd pass on
more detail but this is the first time I've even *read* c-sharp code,
so I don't want to mangle anything in translation :-)
Reply all
Reply to author
0 new messages