Opened 8 years ago

Last modified 8 years ago

#5364 new defect

"p" pump.io client doesn't seem to upload images

Reported by: Daniel Krol Owned by:
Priority: minor Milestone:
Component: programming Keywords:
Cc: Parent Tickets:

Description

I posted this issue initially in the issue tracker for p:

https://github.com/xray7224/p/issues/40#issuecomment-151050574

However I was ultimately able to post an image in another pump.io instance, so I was advised to move the issue here.

I authenticate my webfinger using p. I run:

p post image ../images/image.jpg --title "Test Upload"

It seemed to go through. No std or err output. However I don't see the image on my site. I tried running:

p inbox

And I got something like this:

yooser posted unknown.jpe
  yooser@media.example.com - 5 minutes ago
  Test Upload
  
  ![Image NonexNone][1]
  
     [1]: http://media.example.com/mgoblin_static/images/media_thumbs/image.png

(Only my username and my site's domain are changed here. Everything else should be verbatim.)

However below that, it lists entry from my site, which I uploaded manually long ago. So it seems that it's on the right track but not quite there.

Change History (2)

comment:1 by Daniel Krol, 8 years ago

I forgot to mention - I probably wouldn't care about a problem with a specific client, but this one is recommended in the Mediagoblin docs.

comment:2 by Loic Dachary, 8 years ago

It worked for me with pump.goblinrefuge.com but I don't know how it was setup.

See https://github.com/xray7224/p/issues/41 to know why git reset is neeeded. The 401 error after authorize can be ignored.

$ git clone https://github.com/xray7224/p.git
$ virtualenv virtualenv
$ source virtualenv/bin/activate
$ git reset --hard 2bd146e4f21bef1dc242a28a97b80aed8d6083bc
$ pip install --editable .
$ p authorize dachary@pump.goblinrefuge.com
To add an account you need to authorize p to use your
account and paste the verifier:
http://pump.goblinrefuge.com/oauth/authorize?oauth_token=c1wGAt6Vqe83GBCTMSfHIlJelfLWEi
Verifier Code: cCRW2HKeL5t3cGolvyoORcabvCCQr0vL
pypump.exception.PyPumpException: Request Failed to https://pump.goblinrefuge.com/api/whoami (response: {"error": "Not logged in."} | status: 401)
$ p accounts
Authorized    Webfinger
     ✓        dachary@pump.goblinrefuge.com
$ p post image ~/private/cv/loic-avatar-64x64.png --title "Test Upload"
$ p inbox
dachary posted unknown.png
  dachary@pump.goblinrefuge.com - 5 minutes ago
  Test Upload
  
  ![Image 64x64][1]
  
     [1]: https://b2aeaa58a57a200320db-8b65b95250e902c437b256b5abf3eac7.ssl.cf5.rackcdn.com/media_entries/7313/unknown.png

...
Version 0, edited 8 years ago by Loic Dachary (next)
Note: See TracTickets for help on using tickets.