S3Sync.net
February 02, 2014, 01:20:03 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: NoMethodError when uploading dir instead of dir contents  (Read 9317 times)
ryantate
Newbie
*
Posts: 3


View Profile
« on: February 22, 2007, 02:10:41 PM »

I think I hit a new bug in 1.1.0

This works fine:

Quote
ruby -I s3sync s3sync/s3sync.rb -r --ssl --delete testUploads/ myBucket:testUploads

But this produces an error:

Quote
ruby -I s3sync s3sync/s3sync.rb -r --ssl --delete testUploads myBucket:testUploadsParent

Notice the difference is the lack of trailing slash on the source dir, indicating I want the actual dir itself, not just its contents, uploaded to the destination dir.

The error, the sole output of the command, is:

Quote
s3sync/s3sync.rb:124:in `main': undefined method `[]' for nil:NilClass (NoMethodError)
        from s3sync/s3sync.rb:681

Not sure the cause of this. But if I replace my old version (1.0.13) of s3sync for the new one, everything works fine.
« Last Edit: February 22, 2007, 02:19:34 PM by ryantate » Logged
ferrix
Sr. Member
****
Posts: 363


(I am greg13070 on AWS forum)


View Profile
« Reply #1 on: February 22, 2007, 04:08:47 PM »

Will take a look!
Logged
ferrix
Sr. Member
****
Posts: 363


(I am greg13070 on AWS forum)


View Profile
« Reply #2 on: February 22, 2007, 08:28:26 PM »

Augh.. am I ever an idiot  Roll Eyes

Fix coming.
Logged
ryantate
Newbie
*
Posts: 3


View Profile
« Reply #3 on: February 23, 2007, 02:03:04 PM »

No worries! Glad to see so many new features in the new version!
Logged
grempe
Newbie
*
Posts: 1


View Profile
« Reply #4 on: March 07, 2007, 03:08:21 PM »

I am also seeing a similar error with the latest build:

s3sync.rb:500:in `updateFrom': undefined method `closed?' for nil:NilClass (NoMethodError)
        from s3sync.rb:387:in `main'
        from s3sync.rb:690

I am running s3sync from a cron job with a command like this:

/usr/local/bin/ruby s3sync.rb -r --ssl --delete /home/backups/ bucket.name:/bucket.folder.name/backups

Any ideas?


PS - It would be awesome if you could put this all in a subversion repos so we could keep the code up to date more easily.  Or even better you could package it as a Ruby Gem!  (Try this for easy gem goodness! : http://drnicwilliams.com/2006/10/11/generating-new-gems/ ).
Logged
ferrix
Sr. Member
****
Posts: 363


(I am greg13070 on AWS forum)


View Profile
« Reply #5 on: March 07, 2007, 05:35:16 PM »

I ran into this too this morning and quickly fixed it.  Try getting the tarball again and see if it's better for you as well.  I didn't even up the version for this, which is naughty I know.  But I'm supa busy today.
Logged
lowflyinghawk
Jr. Member
**
Posts: 52


View Profile
« Reply #6 on: March 08, 2007, 06:50:21 AM »

you didn't up the version? shame on you! take yourself to the woodshed!

missing one of these points out how difficult it is be sure all your code is working.  after a long series of changes, all of which worked as far as I could tell, I tried listing an empty bucket. boing! wrong number of arguments error in a logging function!  I thought I'd covered them all by manually editing the code and causing the error side of conditionals to execute, but I was wrong about that.
Logged
ferrix
Sr. Member
****
Posts: 363


(I am greg13070 on AWS forum)


View Profile
« Reply #7 on: March 08, 2007, 08:09:06 AM »

This is the secret (sshhh don't tell) to why I like to foster the s3sync community and don't overtly ask anything in return.  It is really hard to catch all my own bugs  Grin
Logged
lowflyinghawk
Jr. Member
**
Posts: 52


View Profile
« Reply #8 on: March 09, 2007, 07:02:43 AM »

yes, the perversity of users is well known to be unbounded, that's why big projects use betas (of course this doesn't include S3, they just roll it out and pray)  Grin
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!