Closed ihenry closed 13 years ago
Is that all you see? Is there a larger stack trace?
I added the -d command line switch and there's plenty of output. The useful bits seem to be below, but I could be wrong as many of these are warnings.
I will also do some investigation with the debug mode for the regular type vs photo and compare the outputs.
from <internal:lib/rubygems/custom_require>:29:in `require'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/tumblr-rb-1.3.0/lib/tumblr/post.rb:15: warni
ng: *' interpreted as argument prefix C:/Ruby192/lib/ruby/gems/1.9.1/gems/weary-0.7.2/lib/weary/base.rb:104: warning: instance variable @domain not initialized C:/Ruby192/lib/ruby/gems/1.9.1/gems/weary-0.7.2/lib/weary/base.rb:118: warning: instance variable @credentials not initialized C:/Ruby192/lib/ruby/gems/1.9.1/gems/crack-0.1.8/lib/crack/core_extensions.rb:102 :in
normalize_param': warning: URI.escape is obsolete
oded
Exception NameError' at C:/Ruby192/lib/ruby/1.9.1/syck/tag.rb:81 - method
yaml
_as' not defined in Module
C:/Ruby192/lib/ruby/1.9.1/rexml/doctype.rb:255: warning: +' after local variabl e is interpreted as binary operator C:/Ruby192/lib/ruby/1.9.1/rexml/doctype.rb:255: warning: even though it seems li ke unary operator <internal:lib/rubygems/custom_require>:29: warning: loading in progress, circula r require considered harmful - C:/Ruby192/lib/ruby/gems/1.9.1/gems/oauth-0.4.4/l ib/oauth/client/helper.rb Exception
Errno::EWOULDBLOCK' at C:/Ruby192/lib/ruby/1.9.1/net/protocol.rb:135
Ooof. Yeah. Windows. No clue here. Sorry.
So if I was to run ruby on linux or max osx I might have more luck?
I'd have an easier time debugging I think? So many of the dependencies for Tumblr (and Weary) might have issues on Windows machines... Here it looks like Syck (the Ruby yaml parser) is having a problem.
I've replicated this issue on Ubuntu and also down some further investigation, the error is not coming from your Tumblr gem. I can successfully post using your bin\tumblr command line utility so your code doesn't seem to be the issue. The issue comes from me adapting a script that was designed for regular posts and not photos. Is there anyway I can pass in multiple posts via yaml files? Thanks for any tips you can offer.
I'm using Dan Mayers script to upload to Tumblr. http://www.mayerdan.com/2010/05/converting_movable_type_to_tum.php
This uses your Tumblr-rb gem. Everything works when I'm making a regular post e.g. :type => :regular But if I change the type to :type => :photo and put a URL to a photo in the Body then it errors.
<TypeError: can't convert String into Integer>
Unfortunately I can't be sure where it is going wrong.