GithubHelp home page GithubHelp logo

flask-storage's People

Contributors

jpvanhal avatar kvesteri avatar oskarihiltunen avatar tgecho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flask-storage's Issues

Infinite recursion on saving file with FileSystemStorage

I'm trying to save a file inside a Celery task with FileSystemStorage, but it fails due to infinite recursion:

  File "flask-storage/flask_storage/filesystem.py", line 160, in __getattr__
    return getattr(self.file, name)
  File "flask-storage/flask_storage/filesystem.py", line 140, in file
    self._file = open(self.fullname, 'rb')
  File "flask-storage/flask_storage/filesystem.py", line 145, in fullname
    return self.storage.path(self.name)
  File "flask-storage/flask_storage/base.py", line 239, in storage
    return self._storage
  File "flask-storage/flask_storage/filesystem.py", line 160, in __getattr__
    return getattr(self.file, name)
  File "flask-storage/flask_storage/filesystem.py", line 140, in file
    self._file = open(self.fullname, 'rb')
  File "flask-storage/flask_storage/filesystem.py", line 145, in fullname
    return self.storage.path(self.name)
  File "flask-storage/flask_storage/base.py", line 239, in storage
    return self._storage
  ...

ImportError: cannot import name 'urlencode'

I am working with Python 3.5.1 / Window 8.1

>>pip install -e git://github.com/kvesteri/flask-storage.git#egg=Flask-Storage

This is the outcome:

Obtaining Flask-Storage from git+git://github.com/kvesteri/flask-storage.git#egg=Flask-Storage
  Updating c:\users\rodolfo\desktop\dumppython\flask\venv\src\flask-storage clone
Requirement already satisfied: Flask>=0.7 in c:\users\rodolfo\desktop\dumppython\flask\venv\lib\site-packages (from Flask-Storage)
Requirement already satisfied: boto>=2.5.2 in c:\users\rodolfo\desktop\dumppython\flask\venv\lib\site-packages (from Flask-Storage)
Collecting python-cloudfiles>=1.7.10 (from Flask-Storage)
  Using cached python-cloudfiles-1.7.11.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Rodolfo\AppData\Local\Temp\pip-build-t2cefnr2\python-cloudfiles\setup.py", line 6, in <module>
        from cloudfiles.consts import __version__
      File "C:\Users\Rodolfo\AppData\Local\Temp\pip-build-t2cefnr2\python-cloudfiles\cloudfiles\__init__.py", line 82, in <module>
        from cloudfiles.connection     import Connection, ConnectionPool
      File "C:\Users\Rodolfo\AppData\Local\Temp\pip-build-t2cefnr2\python-cloudfiles\cloudfiles\connection.py", line 13, in <module>
        from    urllib    import urlencode
    ImportError: cannot import name 'urlencode'
    

Make sure file reading works

As mentioned in #8, Python's file objects don't support an offset argument to read. Based on the docs, Amazon's keys don't support that either, so its functionality should be tested. It should also be made sure the other storages don't make this mistake and support a uniform API concerning read and seek.

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.