id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
Python_StringIO/1006_244_0.txt
Note, use the full path instead of ...data. The exact path doesn't matter, so long as it's the full path to the egg.
Python_StringIO/1006_341_0.txt
Milestone
Python_StringIO/1006_160_0.txt
**[ wiredfool ](/wiredfool) ** commented Nov 13, 2014
Python_StringIO/775_94_0.txt
I suppose it might be also worth double-checking that the ` LD_LIBRARY_PATH ` environment variable isn't being set to something weird.
Python_StringIO/Python_StringIO_4_0.txt
## Performance ¶ This section discusses the performance of the provided concrete I/O implementations. ### Binary I/O ¶ By reading and writing only large chunks of data even when the user asks for a single byte, buffered I/O hides any inefficiency in calling and executing the operating system’s unbuffered I/O...
Python_StringIO/1006_344_0.txt
No branches or pull requests
Python_StringIO/25046pilhowreturnstr_130_0.txt
[ ![tracyyun](https://bytes.com/avatars/avatar561490_1.gif) ](https://bytes.com/profile/561490/tracyyun/)
Python_StringIO/775_12_0.txt
Is either your web app or scheduled job running in a virtualenv? If so, did you create it some time ago? Some virtualenvs were broken by the Ubuntu upgrade, but that wasn't particularly recent. Even ignoring that issue, it would be useful to know if either (or both) of your tests is within a virtualenv.
Python_StringIO/2205_93_0.txt
**[ boskicthebrain ](/boskicthebrain) ** commented Nov 7, 2016
Python_StringIO/1006_142_0.txt
I did try your first resolution before I started (in IMG.py before the code that throws the error)
Python_StringIO/25046pilhowreturnstr_23_0.txt
</F>
Python_StringIO/2205_95_0.txt
---
Python_StringIO/25046pilhowreturnstr_91_0.txt
Hi there, I'm trying to open colour BMPs using PIL and I'm getting the following errors. Opening a 16 colour BMP I get: Traceback (most recent call last): File "<pyshell#3>", line 1, in...
Python_StringIO/1006_81_0.txt
Copy link
Python_StringIO/775_89_0.txt
Hmm, perhaps it's the Python path? @npohle, could you run Python and then
Python_StringIO/25046pilhowreturnstr_68_0.txt
[ 1 ](https://bytes.com/topic/python/answers/25128-pil-jpg-png-conversion) [ ](https://bytes.com/)
Python_StringIO/2205_49_0.txt
By clicking “Sign up for GitHub”, you agree to our [ terms of service ](https://docs.github.com/terms) and [ privacy statement ](https://docs.github.com/privacy) . We’ll occasionally send you account related emails.
Python_StringIO/775_82_0.txt
from PIL import Image Image.core Image.core.jpeg_decoder Image._getdecoder("RGB", "jpeg", ("RGB", None))
Python_StringIO/Python_StringIO_3_1.txt
(even inquiries) on a closed stream is undefined. Implementations may raise [ ` ValueError ` ](exceptions.html#ValueError "ValueError") in this case. ` IOBase ` (and its subclasses) supports the iterator protocol, meaning that an ` IOBase ` object can be iterated over yielding the lines in a stream. Lines are def...
Python_StringIO/2205_58_0.txt
## Comments
Python_StringIO/1006_263_0.txt
Copy link
Python_StringIO/2205_78_0.txt
[ ![@wiredfool](https://avatars.githubusercontent.com/u/19792?s=80&v=4) ](/wiredfool)
Python_StringIO/1006_73_0.txt
^ I can write the imported PNG file data (__f[__c]) to a new PNG file with no problems (everything is the same) in fact, that's exactly what that test.png upload is (first post), a binary copy from my system:
Python_StringIO/25046pilhowreturnstr_18_0.txt
[ ](https://bytes.com/)
Python_StringIO/1006_69_0.txt
IOError: cannot identify image file <StringIO.StringIO instance at 0x05213A58> IOError: cannot identify image file <_io.BytesIO object at 0x054D2E70>
Python_StringIO/1006_222_0.txt
Sorry, something went wrong.
Python_StringIO/2205_134_0.txt
No milestone
Python_StringIO/1006_38_0.txt
[ Sign up ](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser- name%3E%2F%3Crepo- name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header- repo&source_repo=python-pillow%2FPillow)
Python_StringIO/1006_332_0.txt
All reactions
Python_StringIO/1006_87_0.txt
from PIL import Image im = Image.open('test.png')
Python_StringIO/775_20_0.txt
Here's the code I try to run through bash:
Python_StringIO/2205_52_0.txt
# Save to StringIO doesn't work #2205
Python_StringIO/25046pilhowreturnstr_64_0.txt
by: Steve Castellotti | last post by:
Python_StringIO/1006_210_0.txt
All reactions
Python_StringIO/1006_193_0.txt
Image.register_open("PNG", PngImageFile, _accept) Image.register_save("PNG", _save)
Python_StringIO/775_32_0.txt
![Staff](/static/anywhere/images/staff.png) harry | 2710 posts | PythonAnywhere staff | July 22, 2013, 2:51 p.m. | [ permalink ](https://www.pythonanywhere.com/forums/topic/775/#id_post_5513)
Python_StringIO/775_62_0.txt
I just ran the simplified version above in my PA account and it works fine with no error. Does it work for you too, now?
Python_StringIO/1006_317_0.txt
---
Python_StringIO/25046pilhowreturnstr_139_0.txt
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
Python_StringIO/25046pilhowreturnstr_4_0.txt
[ Home ](/) [ Posts ](/topic/) [ Topics ](/browse/) [ Members ](/users/) [ FAQ ](/faq.php)
Python_StringIO/1006_162_0.txt
That's what happens when no Image plugin handles the file, which often means an import error. Importing from PIL needs to work, or things are going to be broken.
Python_StringIO/1006_125_0.txt
All reactions
Python_StringIO/775_30_0.txt
Ideally, just 2 or 3 lines of code that try and load a local image file and call the problematic img.crop() function?
Python_StringIO/775_98_0.txt
No worries. I'm glad you are following up :-) My output (see below) looks very much like yours. That's probably a bad thing as it doesn't reveal any additional insights... maybe its easier to ask for a brand new account? I don't have that much code so transferring everything wouldn't be a big deal.
Python_StringIO/775_90_0.txt
import sys print sys.path
Python_StringIO/Python_StringIO_3_6.txt
ach() ` , which raises ` UnsupportedOperation ` . Warning ` BufferedRWPair ` does not attempt to synchronize accesses to its underlying raw streams. You should not pass it the same object as reader and writer; use ` BufferedRandom ` instead. ### Text I/O ¶ _ class _ io. TextIOBase ¶ Base class fo...
Python_StringIO/1006_166_0.txt
[ ![@Tcll](https://avatars.githubusercontent.com/u/773959?s=80&u=96a793e9582ba5f3f67877b81c28eb43e5c3cec7&v=4) ](/Tcll)
Python_StringIO/1006_271_0.txt
Sorry, something went wrong.
Python_StringIO/775_50_0.txt
file = StringIO.StringIO(urllib.urlopen('http://www3.nd.edu/~networks/HumanDynamics_20Oct05/images/Einstein_1_JPEG.jpg').read()) img = Image.open(file) img = img.crop((0, 0, 400, 600))
Python_StringIO/775_107_0.txt
deleted-user-39880 | 669 posts | July 25, 2013, 10:36 a.m. | [ permalink ](https://www.pythonanywhere.com/forums/topic/775/#id_post_5619)
Python_StringIO/1006_252_0.txt
**[ Tcll ](/Tcll) ** commented Nov 13, 2014
Python_StringIO/775_104_0.txt
deleted-user-64250 | 10 posts | July 24, 2013, 10:10 p.m. | [ permalink ](https://www.pythonanywhere.com/forums/topic/775/#id_post_5609)
Python_StringIO/1006_102_0.txt
here's how the data is passed to PIL
Python_StringIO/1006_3_0.txt
[ ](https://github.com/)
Python_StringIO/1006_147_0.txt
import sys; sys.path.append( sys.executable.split( sys.argv[1] )[0] ) from PIL import Image # just to make sure from PIL import *
Python_StringIO/1006_208_0.txt
^ uses global PIL, now I just need to clear the pillow.py reference from memory
Python_StringIO/1006_237_0.txt
Copy link
Python_StringIO/1006_113_0.txt
think you guys might have an idea of what may be happening here?? if not it's ok, I don't expect you guys to do my work, I'm only asking for knowledge/experience. ;)
Python_StringIO/1006_11_0.txt
* [ Enterprise ](https://github.com/enterprise) * [ Teams ](https://github.com/team) * [ Startups ](https://github.com/enterprise/startups) * [ Education ](https://education.github.com)
Python_StringIO/775_66_0.txt
I don't think I'm using virtualenv, unless Flask is applying some magic here. An obvious difference is that the Flask Code gets compiled into a pyc file and is then loaded as a Web App by PA. Not sure what happens behind the curtains.
Python_StringIO/1006_246_0.txt
All reactions
Python_StringIO/1006_194_0.txt
Image.register_extension("PNG", ".png") Image.register_mime("PNG", "image/png")
Python_StringIO/1006_126_0.txt
Sorry, something went wrong.
Python_StringIO/25046pilhowreturnstr_104_0.txt
[ parameters for Image.fromstring function in pil ](https://bytes.com/topic/python/answers/770843-parameters-image-fromstring- function-pil)
Python_StringIO/1006_76_0.txt
---
Python_StringIO/1006_99_0.txt
what I've got going on is the PNG is stored in array( 'B', [] )
Python_StringIO/2205_68_0.txt
### What actually happened?
Python_StringIO/1006_201_0.txt
global Image?? >.> no, sys.modules.append()
Python_StringIO/775_109_0.txt
Anyway, we'll keep an eye out for anything related to this in the future, and if it happens again then please do tell us.
Python_StringIO/1006_82_0.txt
Member
Python_StringIO/775_21_0.txt
from functools import wraps import requests import urllib from PIL import Image from PIL import ImageDraw, ImageFont import StringIO from os import listdir from os.path import isfile, join import random import sys, string, xmlrpclib, re
Python_StringIO/25046pilhowreturnstr_42_0.txt
> On Fri, 14 Nov 2003 16:45:39 +0100, "Fredrik Lundh" <fr*****@pythonware.com> > wrote:
Python_StringIO/2205_126_0.txt
[ Sign up for free ](/join?source=comment-repo) **to join this conversation on GitHub** . Already have an account? [ Sign in to comment ](/login?return_to=https%3A%2F%2Fgithub.com%2Fpython- pillow%2FPillow%2Fissues%2F2205)
Python_StringIO/1006_18_0.txt
* [ The ReadME Project GitHub community articles ](https://github.com/readme)
Python_StringIO/1006_8_0.txt
* [ All features ](https://github.com/features) * [ Documentation ](https://docs.github.com) * [ GitHub Skills ](https://skills.github.com) * [ Blog ](https://github.blog)
Python_StringIO/1006_212_0.txt
[ ![@wiredfool](https://avatars.githubusercontent.com/u/19792?s=80&v=4) ](/wiredfool)
Python_StringIO/25046pilhowreturnstr_125_0.txt
[ Changing the language in Windows 10 ](https://bytes.com/topic/windows- server/insights/979214-changing-language-windows-10-a)
Python_StringIO/1006_315_0.txt
@app.route('/predict', methods=["POST"]) def predict(): message = request.get_json(force=True) encoded = message['image'] decoded = base64.b64decode(encoded) with graph.as_default(): image = Image.open(io.BytesIO(decoded)) preprocessed_image = preprocess_image(image, target_size(50, 50)) prediction = model.predict(pre...
Python_StringIO/25046pilhowreturnstr_135_0.txt
[ 0 ](https://bytes.com/topic/career/insights/979226-ai-job-threat-devs)
Python_StringIO/25046pilhowreturnstr_66_0.txt
[ Python ](https://bytes.com/topic/python/answers/)
Python_StringIO/1006_105_0.txt
^ where string(0) >>> array( 'B', [] ).tostring()
Python_StringIO/1006_281_0.txt
import sys; sys.path.append( '%sPillow-2.6.1-py2.7-win32.egg'%sys.executable.split( 'python.exe' )[0] ) from PIL import Image
Python_StringIO/1006_342_0.txt
No milestone
Python_StringIO/1006_111_0.txt
I'll try writing a test file from a StringIO .getdata() output... we'll see if that's the culpret.
Python_StringIO/1006_124_0.txt
---
Python_StringIO/1006_157_0.txt
Copy link
Python_StringIO/1006_79_0.txt
[ ![@Tcll](https://avatars.githubusercontent.com/u/773959?s=40&u=96a793e9582ba5f3f67877b81c28eb43e5c3cec7&v=4) ](/Tcll) [ Tcll ](/Tcll) changed the title ~~found a PNG PIL can't recognize~~ IOError: cannot identify image file (StringIO and BytesIO) Nov 13, 2014
Python_StringIO/2205_0_0.txt
Skip to content
Python_StringIO/25046pilhowreturnstr_56_0.txt
I'd say a reason is to avoid the time you will do it by habit and get a surprise. But yes, there's no technical reason you can't, if you don't want to use the original binding in that scope.
Python_StringIO/25046pilhowreturnstr_124_0.txt
[ 0 ](https://bytes.com/topic/windows-server/insights/979214-changing- language-windows-10-a) [ ](https://bytes.com/)
Python_StringIO/2205_101_0.txt
[ ![@Vivek4DotNet](https://avatars.githubusercontent.com/u/11330310?s=80&u=aa516fb0c7e2e54bdcfa5167bcf34a77dfa8cc2d&v=4) ](/Vivek4DotNet)
Python_StringIO/2205_18_0.txt
* [ The ReadME Project GitHub community articles ](https://github.com/readme)
Python_StringIO/1006_170_0.txt
**[ Tcll ](/Tcll) ** commented Nov 13, 2014
Python_StringIO/25046pilhowreturnstr_100_0.txt
by: Jair Trejo | last post by:
Python_StringIO/2205_129_0.txt
Labels
Python_StringIO/1006_2_0.txt
Toggle navigation
Python_StringIO/25046pilhowreturnstr_6_0.txt
[ Join Bytes to post your question to a community of 473,441 software developers and data experts. ](/submit/g/292/)
Python_StringIO/1006_94_0.txt
Copy link
Python_StringIO/2205_54_0.txt
[ boskicthebrain ](/boskicthebrain) opened this issue Nov 7, 2016 · 4 comments
Python_StringIO/2205_19_0.txt
Repositories