Skip to content

Conversation

@techtonik
Copy link
Contributor

@techtonik techtonik commented Jul 15, 2016

Fixes this:

>>> import PIL
>>> from PIL import ImageGrab
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/PIL/ImageGrab.py", line 22, in <module>
    raise ImportError("ImageGrab is OS X and Windows only")
ImportError: ImageGrab is OS X and Windows only
>>> PIL.version
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'version'
>>> PIL.__version__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute '__version__'
>>> PIL.get_version()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'get_version'
>>> 

@radarhere
Copy link
Member

Just to check - there's no reason for importing ImageGrab in the middle, yes?

@techtonik
Copy link
Contributor Author

@radarhere yes, importing ImageGrab is just demonstration of the problem, which leads to version checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants