Giter Club home page Giter Club logo

filepreviews-python's People

Contributors

jpadilla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

filepreviews-python's Issues

Infinite Loop When Posting Preview to S3 Bucket with Python Tool

Hi,

I look forward to using file previews, but I'm currently having some trouble posting the preview to my S3 bucket.

I'm getting the debug messages below with the last line repeating hundreds of times. While it could be a permissions issue on the S3 bucket, I've tried giving permission to everyone to list and upload objects.

DEBUG:filepreviews:Generating preview for http://www.rawsamples.ch/raws/canon/d30/RAW_CANON_D30_SRGB.CRW
DEBUG:filepreviews:Polling https://s3.amazonaws.com/post-great-pics-test-file-uploads/1d3aebcbd37ceb5a8f74bb2c10caa3b9a3d39001814baedbd50ab4de3bb1badf/metadata.json
DEBUG:filepreviews:Polling https://s3.amazonaws.com/post-great-pics-test-file-uploads/1d3aebcbd37ceb5a8f74bb2c10caa3b9a3d39001814baedbd50ab4de3bb1badf/metadata.json
....

Thank you for looking into this. Please let me know if I can be of assistance.

~Victor

Trouble Following Example

Hi,

I'm trying to follow the example, albeit with my API Key and Secret and I get the following error:

Traceback (most recent call last):
  File "/Users/Victor/Documents/Python/Post_Great_Pics/src/scripts/filepreviews_v2_test", line 6, in <module>
    response = fp.generate('http://www.getblimp.com/images/screenshot1.png')
  File "/Users/Victor/Documents/Python/Post_Great_Pics/pgp_venv/lib/python2.7/site-packages/filepreviews/api.py", line 49, in generate
    response = self.client.post('previews', data=params)
  File "/Users/Victor/Documents/Python/Post_Great_Pics/pgp_venv/lib/python2.7/site-packages/filepreviews/client.py", line 77, in post
    return self.request('POST', *args, json=data)
  File "/Users/Victor/Documents/Python/Post_Great_Pics/pgp_venv/lib/python2.7/site-packages/filepreviews/client.py", line 18, in request
    session_response = self.session.request(method, url, **kwargs)
  File "/Users/Victor/Documents/Python/Post_Great_Pics/pgp_venv/lib/python2.7/site-packages/requests/sessions.py", line 465, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/Victor/Documents/Python/Post_Great_Pics/pgp_venv/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "/Users/Victor/Documents/Python/Post_Great_Pics/pgp_venv/lib/python2.7/site-packages/requests/adapters.py", line 415, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error(60, 'Operation timed out'))

Here is my code:

from filepreviews import FilePreviews

fp = FilePreviews(api_key='X', api_secret='Y')
response = fp.generate('http://www.getblimp.com/images/screenshot1.png')
print response

Lost Support for CRW File

On Feb 22 I was testing File Previews with the Following Code, and getting a successful response:

fp = FilePreviews()

sample_result = fp.generate('http://www.getblimp.com/images/screenshot1.png')

print 'sample_result'
print sample_result

raw_result_1 = fp.generate('http://www.rawsamples.ch/raws/canon/d30/RAW_CANON_D30_SRGB.CRW') # 3mb

print 'raw_result_1'
print raw_result_1`

However, when I am running this today (APril 22) the screenshot is successfull, but the .CRW is failing. My output is below:

sample_result
{'preview_url': u'https://s3.amazonaws.com/demo.filepreviews.io/f7ce58c6f27c15a793b6df228c0c5b42ec067f57cd691a90e85d47d92306f4cd/screenshot1_original_1.png', 'metadata': {u'data': None, u'results': {u'mimetype': u'image/png', u'name': u'screenshot1', u'extension': u'png', u'encoding': u'binary', u'thumbnails': [{u'url': u'https://s3.amazonaws.com/demo.filepreviews.io/f7ce58c6f27c15a793b6df228c0c5b42ec067f57cd691a90e85d47d92306f4cd/screenshot1_original_1.png', u'requested_size': u'original', u'resized': False, u'total_pages': 1, u'original_size': {u'width': u'560', u'height': u'397'}, u'page': 1, u'size': {u'width': u'560', u'height': u'397'}}], u'metadata': {}, u'type': u'image', u'size': 92602}}}
raw_result_1
{'preview_url': u'https://s3.amazonaws.com/demo.filepreviews.io/9dbd9fd7e1e0fe1df2ccdd322fcf3d7f27a57fb17bb95e4961d0f9bb389908ca/RAW_CANON_D30_SRGB_original_1.png', 'metadata': {u'error': u'FrameExtractionException'}}

I'd be happy to provide more info, just let me know :)

~Victor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.