Unable to upload cookbook

I’m getting the following on attempts to upload my application cookbook:

master ✗ % knife cookbook upload application
INFO: Saving application
INFO: Validating ruby files
INFO: Validating templates
INFO: Syntax OK
INFO: Generating Metadata
INFO: Uploading files
INFO: Uploading (checksum hex = ) to https://s3.amazonaws.com/opscode-platform-production-data/organization-37c9c504005c48fb95db81d246f263ed/sandbox-cc49c00dbe0840fa81e65ae479a4d53f/checksum-?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1294587770&Signature=p8cPSpgrAWIM0PihaJzNONrmFMI%3D
/Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/cookbook_uploader.rb:39:in read': can't convert nil into String (TypeError) from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/cookbook_uploader.rb:39:inupload_cookbook’
from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/cookbook_uploader.rb:30:in each' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/cookbook_uploader.rb:30:inupload_cookbook’
from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:67:in run' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:65:ineach’
from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:65:in run' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:80:inhumanize_auth_exceptions’
from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:53:in run' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife.rb:127:inrun’
from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/application/knife.rb:121:in run' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/bin/knife:25 from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/bin/knife:19:inload’
from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/bin/knife:19

I’m not sure what I’ve changed - every other cookbook seems to upload ok, but this doesn’t…

The src is:

file_contents = File.read(checksum_files[checksum])

Which suggests some checksum oddness…

Any ideas?

S.

Stephen,

Try running command with:

'-l debug' to see a little more verbose output and possibly some clues.

H

On Sun, Jan 9, 2011 at 9:48 AM, Stephen Nelson-Smith <
stephen@atalanta-systems.com> wrote:

I'm getting the following on attempts to upload my application cookbook:

master ✗ % knife cookbook upload application
INFO: Saving application
INFO: Validating ruby files
INFO: Validating templates
INFO: Syntax OK
INFO: Generating Metadata
INFO: Uploading files
INFO: Uploading (checksum hex = ) to
https://s3.amazonaws.com/opscode-platform-production-data/organization-37c9c504005c48fb95db81d246f263ed/sandbox-cc49c00dbe0840fa81e65ae479a4d53f/checksum-?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1294587770&Signature=p8cPSpgrAWIM0PihaJzNONrmFMI%3D

/Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/cookbook_uploader.rb:39:inread': can't convert nil into String (TypeError) from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/cookbook_uploader.rb:39:in upload_cookbook'
from
/Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/cookbook_uploader.rb:30:in
each' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/cookbook_uploader.rb:30:in upload_cookbook'
from
/Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:67:in
run' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:65:in each'
from
/Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:65:in
run' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:80:in humanize_auth_exceptions'
from
/Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:53:in
run' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife.rb:127:in run'
from
/Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/application/knife.rb:121:in
run' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/bin/knife:25 from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/bin/knife:19:in load'
from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/bin/knife:19

I'm not sure what I've changed - every other cookbook seems to upload ok,
but this doesn't....

The src is:

file_contents = File.read(checksum_files[checksum])

Which suggests some checksum oddness...

Any ideas?

S.

--
Hank Beaver
Principal Architect
Mobile| 404.910.3404

MaxMedia
2160 Hills Ave | Suite A
Atlanta, GA 30318
Fax | 404.949.009

Thanks for the reply, Hank,

In the end, I just deleted the cookbook, and built it up from scratch a file at a time until it worked again. Not sure what I did to break it though.

S.

On 9 Jan 2011, at 15:54, Hank Beaver wrote:

Stephen,

Try running command with:

'-l debug' to see a little more verbose output and possibly some clues.

H

On Sun, Jan 9, 2011 at 9:48 AM, Stephen Nelson-Smith stephen@atalanta-systems.com wrote:
I'm getting the following on attempts to upload my application cookbook:

master ✗ % knife cookbook upload application
INFO: Saving application
INFO: Validating ruby files
INFO: Validating templates
INFO: Syntax OK
INFO: Generating Metadata
INFO: Uploading files
INFO: Uploading (checksum hex = ) to https://s3.amazonaws.com/opscode-platform-production-data/organization-37c9c504005c48fb95db81d246f263ed/sandbox-cc49c00dbe0840fa81e65ae479a4d53f/checksum-?AWSAccessKeyId=AKIAJOZTD2N26S7W6APA&Expires=1294587770&Signature=p8cPSpgrAWIM0PihaJzNONrmFMI%3D
/Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/cookbook_uploader.rb:39:in read': can't convert nil into String (TypeError) from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/cookbook_uploader.rb:39:in upload_cookbook'
from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/cookbook_uploader.rb:30:in each' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/cookbook_uploader.rb:30:in upload_cookbook'
from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:67:in run' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:65:in each'
from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:65:in run' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:80:in humanize_auth_exceptions'
from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife/cookbook_upload.rb:53:in run' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/knife.rb:127:in run'
from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/lib/chef/application/knife.rb:121:in run' from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/gems/chef-0.9.12/bin/knife:25 from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/bin/knife:19:in load'
from /Users/stephen/.rvm/gems/ree-1.8.7-2010.02/bin/knife:19

I'm not sure what I've changed - every other cookbook seems to upload ok, but this doesn't....

The src is:

file_contents = File.read(checksum_files[checksum])

Which suggests some checksum oddness...

Any ideas?

S.

--
Hank Beaver
Principal Architect
Mobile| 404.910.3404

MaxMedia
2160 Hills Ave | Suite A
Atlanta, GA 30318
Fax | 404.949.009