Coder Social home page Coder Social logo

dimensions's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

dimensions's Issues

Py3!!

pls support Py3.2. I see "Cannot import StringIO" and see this

https://docs.python.org/3.0/whatsnew/3.0.html

StringIO and cStringIO modules are gone. Instead, import the io module and use io.StringIO or io.BytesIO for text and data respectively.

import fix

i use in my code. i place folder dimensions to path (sys.path) and now have error
"Cannot import JPGFile"

fix is this

from . import PNGFile
from . import GIFFile
from . import JPEGFile

in core.py.
import from .!!

IOError exception when passing a single unicode filename

In Python 2.7

import dimensions
print dimensions.dimensions(u'duck.jpg')

Fails with:

Traceback (most recent call last):
  File "test.py", line 3, in <module>
    dimensions.dimensions(u'duck.jpg')
  File "/Users/perezju/.pyenv/versions/dinah_env/lib/python2.7/site-packages/dimensions/core.py", line 55, in dimensions
    dims = get_dimensions(filenames)
  File "/Users/perezju/.pyenv/versions/dinah_env/lib/python2.7/site-packages/dimensions/core.py", line 27, in get_dimensions
    with open(filename, 'rb') as fp:
IOError: [Errno 2] No such file or directory: u'd'

A silly workaround is to pass a list with a single element:

print dimensions.dimensions([u'duck.jpg'])

No module named 'PNGFile'

When I tried to import dimensions, I got this error message. I'm using python 3.4 on windows 7.

Traceback (most recent call last):
File "G:\site\gallery\gen_code.py", line 1, in
import os, dimensions
File "C:\Python34\lib\site-packages\dimensions__init__.py", line 1, in
from .core import dimensions, cli
File "C:\Python34\lib\site-packages\dimensions\core.py", line 15, in
import PNGFile
ImportError: No module named 'PNGFile'

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.