[google-appengine] How to filter images on GAE?

2012-04-17 Thread Computer_Engineer
I'm working on python google app engine application,i'm using python2.5, i 
want to deal with images on GAE(filter images), initially i tried wit PIL 
library and i installed it successfully and i tested it and it works 
correctly on my computer,but when i test it on localhost(run on GAE), i 
have an error thatNotImplementedError: Unable to find the Python PIL 
library,then 
i tried to deal with images using Images Python API , as in this tutorial:
https://developers.google.com/appengine/docs/python/images/overview, and i 
tested resizing images service,and it works correctly,but the main 
application that i want is to filter the images,the question is :if this 
service(image filtering) supported in Images Python API in GAE?and if not 
how can i filter images on GAE?i saw that this service available in PIL,but 
this library is not supported by GAE
I tried as a second choice to use python2.7 such that it supports PIL 
library and i edited the app.yaml configuration file,but i don't know how 
to use this library in the python page(main.py)?
app.yaml:
application: app_id
version: 1
runtime: python27
api_version: 1
threadsafe: false
handlers:
- url: /.*
  script: main.py
libraries:
- name: PIL
  version: "1.1.7"

...any suggestions are welcome...Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/g48i1VaP0IUJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to filter images on GAE?

2012-04-18 Thread Computer_Engineer
Brian Quinlan:Thanks for your response,i tried as :from PIL import Image , 
but the problem still as :No module named PIL 
  args = ('No module named PIL',) 
  message = 'No module named PIL'

On Tuesday, April 17, 2012 5:11:44 PM UTC+3, Computer_Engineer wrote:
>
> I'm working on python google app engine application,i'm using python2.5, i 
> want to deal with images on GAE(filter images), initially i tried wit PIL 
> library and i installed it successfully and i tested it and it works 
> correctly on my computer,but when i test it on localhost(run on GAE), i 
> have an error thatNotImplementedError: Unable to find the Python PIL 
> library,then i tried to deal with images using Images Python API , as in 
> this tutorial:
> https://developers.google.com/appengine/docs/python/images/overview, and 
> i tested resizing images service,and it works correctly,but the main 
> application that i want is to filter the images,the question is :if this 
> service(image filtering) supported in Images Python API in GAE?and if not 
> how can i filter images on GAE?i saw that this service available in PIL,but 
> this library is not supported by GAE
> I tried as a second choice to use python2.7 such that it supports PIL 
> library and i edited the app.yaml configuration file,but i don't know how 
> to use this library in the python page(main.py)?
> app.yaml:
> application: app_id
> version: 1
> runtime: python27
> api_version: 1
> threadsafe: false
> handlers:
> - url: /.*
>   script: main.py
> libraries:
> - name: PIL
>   version: "1.1.7"
>
> ...any suggestions are welcome...Thanks
>

On Tuesday, April 17, 2012 5:11:44 PM UTC+3, Computer_Engineer wrote:
>
> I'm working on python google app engine application,i'm using python2.5, i 
> want to deal with images on GAE(filter images), initially i tried wit PIL 
> library and i installed it successfully and i tested it and it works 
> correctly on my computer,but when i test it on localhost(run on GAE), i 
> have an error thatNotImplementedError: Unable to find the Python PIL 
> library,then i tried to deal with images using Images Python API , as in 
> this tutorial:
> https://developers.google.com/appengine/docs/python/images/overview, and 
> i tested resizing images service,and it works correctly,but the main 
> application that i want is to filter the images,the question is :if this 
> service(image filtering) supported in Images Python API in GAE?and if not 
> how can i filter images on GAE?i saw that this service available in PIL,but 
> this library is not supported by GAE
> I tried as a second choice to use python2.7 such that it supports PIL 
> library and i edited the app.yaml configuration file,but i don't know how 
> to use this library in the python page(main.py)?
> app.yaml:
> application: app_id
> version: 1
> runtime: python27
> api_version: 1
> threadsafe: false
> handlers:
> - url: /.*
>   script: main.py
> libraries:
> - name: PIL
>   version: "1.1.7"
>
> ...any suggestions are welcome...Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/f2BduRaG_CsJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to filter images on GAE?

2012-04-18 Thread Computer_Engineer
Robert Kluin:
*I firstly run my code on localhost to check errors.then i upload it to 
GAE,i use eclipse for working on python with GAE in windows, i installed 
python2.7 *
*and PIL version 1.1.7,then i edited the app.yaml,but the problem 
still,please i want a solution for this problem as soon as possible.*
*Thank you..*
*
*
On Tuesday, April 17, 2012 5:11:44 PM UTC+3, Computer_Engineer wrote:
>
> I'm working on python google app engine application,i'm using python2.5, i 
> want to deal with images on GAE(filter images), initially i tried wit PIL 
> library and i installed it successfully and i tested it and it works 
> correctly on my computer,but when i test it on localhost(run on GAE), i 
> have an error thatNotImplementedError: Unable to find the Python PIL 
> library,then i tried to deal with images using Images Python API , as in 
> this tutorial:
> https://developers.google.com/appengine/docs/python/images/overview, and 
> i tested resizing images service,and it works correctly,but the main 
> application that i want is to filter the images,the question is :if this 
> service(image filtering) supported in Images Python API in GAE?and if not 
> how can i filter images on GAE?i saw that this service available in PIL,but 
> this library is not supported by GAE
> I tried as a second choice to use python2.7 such that it supports PIL 
> library and i edited the app.yaml configuration file,but i don't know how 
> to use this library in the python page(main.py)?
> app.yaml:
> application: app_id
> version: 1
> runtime: python27
> api_version: 1
> threadsafe: false
> handlers:
> - url: /.*
>   script: main.py
> libraries:
> - name: PIL
>   version: "1.1.7"
>
> ...any suggestions are welcome...Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/tmkdHRDGqAYJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to filter images on GAE?

2012-04-18 Thread Computer_Engineer
Brian Quinlan: i tried to upload it into my application on GAE, the error 
still???what can i do?

On Tuesday, April 17, 2012 5:11:44 PM UTC+3, Computer_Engineer wrote:
>
> I'm working on python google app engine application,i'm using python2.5, i 
> want to deal with images on GAE(filter images), initially i tried wit PIL 
> library and i installed it successfully and i tested it and it works 
> correctly on my computer,but when i test it on localhost(run on GAE), i 
> have an error thatNotImplementedError: Unable to find the Python PIL 
> library,then i tried to deal with images using Images Python API , as in 
> this tutorial:
> https://developers.google.com/appengine/docs/python/images/overview, and 
> i tested resizing images service,and it works correctly,but the main 
> application that i want is to filter the images,the question is :if this 
> service(image filtering) supported in Images Python API in GAE?and if not 
> how can i filter images on GAE?i saw that this service available in PIL,but 
> this library is not supported by GAE
> I tried as a second choice to use python2.7 such that it supports PIL 
> library and i edited the app.yaml configuration file,but i don't know how 
> to use this library in the python page(main.py)?
> app.yaml:
> application: app_id
> version: 1
> runtime: python27
> api_version: 1
> threadsafe: false
> handlers:
> - url: /.*
>   script: main.py
> libraries:
> - name: PIL
>   version: "1.1.7"
>
> ...any suggestions are welcome...Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/Gy6_kxeqsY0J.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to filter images on GAE?

2012-04-18 Thread Computer_Engineer
"C:\Program 
Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", 
line 3945, in _Dispatch
base_env_dict=env_dict)
  File "C:\Program 
Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", 
line 605, in Dispatch
base_env_dict=base_env_dict)
  File "C:\Program 
Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", 
line 3015, in Dispatch
self._module_dict)
  File "C:\Program 
Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", 
line 2925, in ExecuteCGI
reset_modules = exec_script(handler_path, cgi_path, hook)
  File "C:\Program 
Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", 
line 2785, in ExecuteOrImportScript
exec module_code in script_module.__dict__
  File "C:\Users\me\workspace\img_filter\helloworld.py", line 1, in 
from PIL import Image
ImportError: No module named PIL
INFO 2012-04-18 21:09:37,904 dev_appserver.py:4143] "GET /favicon.ico 
HTTP/1.1" 500 -

On Tuesday, April 17, 2012 5:11:44 PM UTC+3, Computer_Engineer wrote:
>
> I'm working on python google app engine application,i'm using python2.5, i 
> want to deal with images on GAE(filter images), initially i tried wit PIL 
> library and i installed it successfully and i tested it and it works 
> correctly on my computer,but when i test it on localhost(run on GAE), i 
> have an error thatNotImplementedError: Unable to find the Python PIL 
> library,then i tried to deal with images using Images Python API , as in 
> this tutorial:
> https://developers.google.com/appengine/docs/python/images/overview, and 
> i tested resizing images service,and it works correctly,but the main 
> application that i want is to filter the images,the question is :if this 
> service(image filtering) supported in Images Python API in GAE?and if not 
> how can i filter images on GAE?i saw that this service available in PIL,but 
> this library is not supported by GAE
> I tried as a second choice to use python2.7 such that it supports PIL 
> library and i edited the app.yaml configuration file,but i don't know how 
> to use this library in the python page(main.py)?
> app.yaml:
> application: app_id
> version: 1
> runtime: python27
> api_version: 1
> threadsafe: false
> handlers:
> - url: /.*
>   script: main.py
> libraries:
> - name: PIL
>   version: "1.1.7"
>
> ...any suggestions are welcome...Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/ybmVHi70O0IJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to filter images on GAE?

2012-04-18 Thread Computer_Engineer
Sorry,but how can i get the log file from the product?


On Tuesday, April 17, 2012 5:11:44 PM UTC+3, Computer_Engineer wrote:
>
> I'm working on python google app engine application,i'm using python2.5, i 
> want to deal with images on GAE(filter images), initially i tried wit PIL 
> library and i installed it successfully and i tested it and it works 
> correctly on my computer,but when i test it on localhost(run on GAE), i 
> have an error thatNotImplementedError: Unable to find the Python PIL 
> library,then i tried to deal with images using Images Python API , as in 
> this tutorial:
> https://developers.google.com/appengine/docs/python/images/overview, and 
> i tested resizing images service,and it works correctly,but the main 
> application that i want is to filter the images,the question is :if this 
> service(image filtering) supported in Images Python API in GAE?and if not 
> how can i filter images on GAE?i saw that this service available in PIL,but 
> this library is not supported by GAE
> I tried as a second choice to use python2.7 such that it supports PIL 
> library and i edited the app.yaml configuration file,but i don't know how 
> to use this library in the python page(main.py)?
> app.yaml:
> application: app_id
> version: 1
> runtime: python27
> api_version: 1
> threadsafe: false
> handlers:
> - url: /.*
>   script: main.py
> libraries:
> - name: PIL
>   version: "1.1.7"
>
> ...any suggestions are welcome...Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/CcIwSJCCDXEJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to filter images on GAE?

2012-04-18 Thread Computer_Engineer
This is the log from the admin console log:

   1. 
  1. 2012-04-18 14:37:10.162 /favicon.ico 500 666ms 0kb Mozilla/5.0 
  (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like 
Gecko) 
  Chrome/9.0.597.67 Safari/534.13
  
  86.108.69.231 - - [18/Apr/2012:14:37:10 -0700] "GET /favicon.ico 
HTTP/1.1" 500 0 - "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) 
AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.67 Safari/534.13" 
"filterimages2012.appspot.com" ms=667 cpu_ms=350 api_cpu_ms=0 cpm_usd=0.009764 
instance=00c61b117c8fe6c4727b8c723b40c98b47e0df7f 
<https://appengine.google.com/instances?app_id=s~filterimages2012&version_id=1.358303610596814412&key=00c61b117c8fe6c4727b8c723b40c98b47e0df7f#00c61b117c8fe6c4727b8c723b40c98b47e0df7f>
  
  2. E2012-04-18 14:37:10.033
  
  Traceback (most recent call last):
File 
"/base/data/home/apps/s~filterimages2012/1.358303610596814412/helloworld.py", 
line 7, in 
  out.save("2.jpg")
File 
"/base/python27_runtime/python27_lib/versions/third_party/PIL-1.1.7/PIL/Image.py",
 line 1433, in save
  fp = __builtin__.open(fp, "wb")
  IOError: [Errno 13] Permission denied: '2.jpg'
  
  2. 
  1. 2012-04-18 14:37:09.075 / 500 957ms 0kb Mozilla/5.0 (Windows; U; 
  Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) 
  Chrome/9.0.597.67 Safari/534.13
  
  86.108.69.231 - - [18/Apr/2012:14:37:09 -0700] "GET / HTTP/1.1" 500 0 - 
"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, 
like Gecko) Chrome/9.0.597.67 Safari/534.13" "filterimages2012.appspot.com" 
ms=958 cpu_ms=467 api_cpu_ms=0 cpm_usd=0.013012 loading_request=1 
instance=00c61b117c8fe6c4727b8c723b40c98b47e0df7f 
<https://appengine.google.com/instances?app_id=s~filterimages2012&version_id=1.358303610596814412&key=00c61b117c8fe6c4727b8c723b40c98b47e0df7f#00c61b117c8fe6c4727b8c723b40c98b47e0df7f>
  
  2. E2012-04-18 14:37:09.071
  
  Traceback (most recent call last):
File 
"/base/data/home/apps/s~filterimages2012/1.358303610596814412/helloworld.py", 
line 7, in 
  out.save("2.jpg")
File 
"/base/python27_runtime/python27_lib/versions/third_party/PIL-1.1.7/PIL/Image.py",
 line 1433, in save
  fp = __builtin__.open(fp, "wb")
  IOError: [Errno 13] Permission denied: '2.jpg'
  
  3. I2012-04-18 14:37:09.074
  
  This request caused a new process to be started for your application, and 
thus caused your application code to be loaded for the first time. This request 
may thus take longer and use more CPU than a typical request for your 
application.
  
  

On Tuesday, April 17, 2012 5:11:44 PM UTC+3, Computer_Engineer wrote:
>
> I'm working on python google app engine application,i'm using python2.5, i 
> want to deal with images on GAE(filter images), initially i tried wit PIL 
> library and i installed it successfully and i tested it and it works 
> correctly on my computer,but when i test it on localhost(run on GAE), i 
> have an error thatNotImplementedError: Unable to find the Python PIL 
> library,then i tried to deal with images using Images Python API , as in 
> this tutorial:
> https://developers.google.com/appengine/docs/python/images/overview, and 
> i tested resizing images service,and it works correctly,but the main 
> application that i want is to filter the images,the question is :if this 
> service(image filtering) supported in Images Python API in GAE?and if not 
> how can i filter images on GAE?i saw that this service available in PIL,but 
> this library is not supported by GAE
> I tried as a second choice to use python2.7 such that it supports PIL 
> library and i edited the app.yaml configuration file,but i don't know how 
> to use this library in the python page(main.py)?
> app.yaml:
> application: app_id
> version: 1
> runtime: python27
> api_version: 1
> threadsafe: false
> handlers:
> - url: /.*
>   script: main.py
> libraries:
> - name: PIL
>   version: "1.1.7"
>
> ...any suggestions are welcome...Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/Rk9EAnJyPIEJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to filter images on GAE?

2012-04-18 Thread Computer_Engineer
Thanks very much for you Brian and Report,the error is from i error 
in access to files,this is no  problem,i can solve it ,really thanks.I 
discovered the problem from the log file.

On Tuesday, April 17, 2012 5:11:44 PM UTC+3, Computer_Engineer wrote:
>
> I'm working on python google app engine application,i'm using python2.5, i 
> want to deal with images on GAE(filter images), initially i tried wit PIL 
> library and i installed it successfully and i tested it and it works 
> correctly on my computer,but when i test it on localhost(run on GAE), i 
> have an error thatNotImplementedError: Unable to find the Python PIL 
> library,then i tried to deal with images using Images Python API , as in 
> this tutorial:
> https://developers.google.com/appengine/docs/python/images/overview, and 
> i tested resizing images service,and it works correctly,but the main 
> application that i want is to filter the images,the question is :if this 
> service(image filtering) supported in Images Python API in GAE?and if not 
> how can i filter images on GAE?i saw that this service available in PIL,but 
> this library is not supported by GAE
> I tried as a second choice to use python2.7 such that it supports PIL 
> library and i edited the app.yaml configuration file,but i don't know how 
> to use this library in the python page(main.py)?
> app.yaml:
> application: app_id
> version: 1
> runtime: python27
> api_version: 1
> threadsafe: false
> handlers:
> - url: /.*
>   script: main.py
> libraries:
> - name: PIL
>   version: "1.1.7"
>
> ...any suggestions are welcome...Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/x5W0ja_Z19gJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to filter images on GAE?

2012-04-18 Thread Computer_Engineer
aschmid: yes i i know that but i was thinking the problem from the PIL it 
self,until i see the log file,thank you for your response.

On Tuesday, April 17, 2012 5:11:44 PM UTC+3, Computer_Engineer wrote:
>
> I'm working on python google app engine application,i'm using python2.5, i 
> want to deal with images on GAE(filter images), initially i tried wit PIL 
> library and i installed it successfully and i tested it and it works 
> correctly on my computer,but when i test it on localhost(run on GAE), i 
> have an error thatNotImplementedError: Unable to find the Python PIL 
> library,then i tried to deal with images using Images Python API , as in 
> this tutorial:
> https://developers.google.com/appengine/docs/python/images/overview, and 
> i tested resizing images service,and it works correctly,but the main 
> application that i want is to filter the images,the question is :if this 
> service(image filtering) supported in Images Python API in GAE?and if not 
> how can i filter images on GAE?i saw that this service available in PIL,but 
> this library is not supported by GAE
> I tried as a second choice to use python2.7 such that it supports PIL 
> library and i edited the app.yaml configuration file,but i don't know how 
> to use this library in the python page(main.py)?
> app.yaml:
> application: app_id
> version: 1
> runtime: python27
> api_version: 1
> threadsafe: false
> handlers:
> - url: /.*
>   script: main.py
> libraries:
> - name: PIL
>   version: "1.1.7"
>
> ...any suggestions are welcome...Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/sHAKXAqSCkUJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to filter images on GAE?

2012-04-19 Thread Computer_Engineer
I want to filter images using GAE,firstly i stored the image in the 
blobstore as it's without changes, then i got the url for that image to 
open it then filter using PIL,the original image is stored correctly in the 
blobstore but i can't open it using the url how can i open it to filter? i 
tried as:
 url = images.get_serving_url(blob_key)
imageFile = url
im = Image.open(imageFile)
but this makes error.?


On Tuesday, April 17, 2012 5:11:44 PM UTC+3, Computer_Engineer wrote:
>
> I'm working on python google app engine application,i'm using python2.5, i 
> want to deal with images on GAE(filter images), initially i tried wit PIL 
> library and i installed it successfully and i tested it and it works 
> correctly on my computer,but when i test it on localhost(run on GAE), i 
> have an error thatNotImplementedError: Unable to find the Python PIL 
> library,then i tried to deal with images using Images Python API , as in 
> this tutorial:
> https://developers.google.com/appengine/docs/python/images/overview, and 
> i tested resizing images service,and it works correctly,but the main 
> application that i want is to filter the images,the question is :if this 
> service(image filtering) supported in Images Python API in GAE?and if not 
> how can i filter images on GAE?i saw that this service available in PIL,but 
> this library is not supported by GAE
> I tried as a second choice to use python2.7 such that it supports PIL 
> library and i edited the app.yaml configuration file,but i don't know how 
> to use this library in the python page(main.py)?
> app.yaml:
> application: app_id
> version: 1
> runtime: python27
> api_version: 1
> threadsafe: false
> handlers:
> - url: /.*
>   script: main.py
> libraries:
> - name: PIL
>   version: "1.1.7"
>
> ...any suggestions are welcome...Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/sEauTynQ4_sJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to filter images on GAE?

2012-04-19 Thread Computer_Engineer
Please i want to ask how can i test the application locally before 
uploading it to GAE,how can i solve the PIL problem on localhost?and if i 
want to filter images using PIL i will open it  firstly,so my code 
initially let the user to upload his photo then i store this image in 
blobstorem and get the url of this image top open it,but this didn't solve 
the problem;that i can't open it?

On Tuesday, April 17, 2012 5:11:44 PM UTC+3, Computer_Engineer wrote:
>
> I'm working on python google app engine application,i'm using python2.5, i 
> want to deal with images on GAE(filter images), initially i tried wit PIL 
> library and i installed it successfully and i tested it and it works 
> correctly on my computer,but when i test it on localhost(run on GAE), i 
> have an error thatNotImplementedError: Unable to find the Python PIL 
> library,then i tried to deal with images using Images Python API , as in 
> this tutorial:
> https://developers.google.com/appengine/docs/python/images/overview, and 
> i tested resizing images service,and it works correctly,but the main 
> application that i want is to filter the images,the question is :if this 
> service(image filtering) supported in Images Python API in GAE?and if not 
> how can i filter images on GAE?i saw that this service available in PIL,but 
> this library is not supported by GAE
> I tried as a second choice to use python2.7 such that it supports PIL 
> library and i edited the app.yaml configuration file,but i don't know how 
> to use this library in the python page(main.py)?
> app.yaml:
> application: app_id
> version: 1
> runtime: python27
> api_version: 1
> threadsafe: false
> handlers:
> - url: /.*
>   script: main.py
> libraries:
> - name: PIL
>   version: "1.1.7"
>
> ...any suggestions are welcome...Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/W3-vzVSeq94J.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to filter images on GAE?

2012-04-19 Thread Computer_Engineer
Brian:
Thanks for your response, i can got the file and i opened it as :
im = Image.open(blob_info.open())
out = im.filter(ImageFilter.EDGE_ENHANCE_MORE)
   

u_file = 
files.blobstore.create(mime_type=m,_blobinfo_uploaded_filename=name)
data=out
with files.open(u_file, 'a') as f:
f.write(data)
files.finalize(u_file)
blob_key = files.blobstore.get_blob_key(u_file)
such that the blob_info is the information about the original image in the 
blob store,but after filtering i can't store it on blobstore,i can't 
specify the correct value for data.

On Tuesday, April 17, 2012 5:11:44 PM UTC+3, Computer_Engineer wrote:
>
> I'm working on python google app engine application,i'm using python2.5, i 
> want to deal with images on GAE(filter images), initially i tried wit PIL 
> library and i installed it successfully and i tested it and it works 
> correctly on my computer,but when i test it on localhost(run on GAE), i 
> have an error thatNotImplementedError: Unable to find the Python PIL 
> library,then i tried to deal with images using Images Python API , as in 
> this tutorial:
> https://developers.google.com/appengine/docs/python/images/overview, and 
> i tested resizing images service,and it works correctly,but the main 
> application that i want is to filter the images,the question is :if this 
> service(image filtering) supported in Images Python API in GAE?and if not 
> how can i filter images on GAE?i saw that this service available in PIL,but 
> this library is not supported by GAE
> I tried as a second choice to use python2.7 such that it supports PIL 
> library and i edited the app.yaml configuration file,but i don't know how 
> to use this library in the python page(main.py)?
> app.yaml:
> application: app_id
> version: 1
> runtime: python27
> api_version: 1
> threadsafe: false
> handlers:
> - url: /.*
>   script: main.py
> libraries:
> - name: PIL
>   version: "1.1.7"
>
> ...any suggestions are welcome...Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/CdvPC9F6e3QJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Using conversion API to convert from text into PDF

2012-04-25 Thread Computer_Engineer
Hi, i'm working on a task that i want to convert text file into PDF one 
using conversion API that is in GAE , i tried as:
https://developers.google.com/appengine/docs/python/conversion/overview

This is the approach that i used:

from __future__ import with_statement
from google.appengine.api import files
import cgi, cgitb ; cgitb.enable()
import StringIO
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import mimetypes
from google.appengine.ext import blobstore
from mimetypes import guess_type
from google.appengine.api import conversion




def mime_type(filename):
return guess_type(filename)[0]
class get(webapp.RequestHandler):
def post(self):

form = cgi.FieldStorage() 
file_upload = form['file']  
name=file_upload.filename  
 
m=mimetypes.guess_type(name)[0]

data=file_upload.file.read()
buf = StringIO.StringIO()
asset = conversion.Asset("text/plain", data, file_upload.filename)
conversion_obj = conversion.ConversionRequest(asset, 
"application/pdf")
result = conversion.convert(conversion_obj)
if result.assets:
 buf.write(asset._data)

else:
 print "ERROR" 
   

u_file = 
files.blobstore.create(mime_type="application/pdf",_blobinfo_uploaded_filename="test.pdf")
data=buf.getvalue()
with files.open(u_file, 'a') as f:
  f.write(data)
files.finalize(u_file)
blob_key = files.blobstore.get_blob_key(u_file)
  
   

  
def main():
application = webapp.WSGIApplication( [(r'/get.py', get)], debug=True)
run_wsgi_app(application)

if __name__ == "__main__":
main()

But when i try to open this PDF,i can't open it and the adobe reader gives 
error immediately that it can't open the file.
Sorry i'm still beginner in these issues,any help please?
Any suggestions are welcome. 



-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/g2vssK1g2mcJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Storing from PDF to IMG

2012-04-26 Thread Computer_Engineer
Max: What is the problem with conversion API,it's simple!!
*
*
On Thursday, March 15, 2012 12:16:44 PM UTC+2, Max wrote:
>
> Dear All,
> I'm always storing the img I receive in the blobstore using this code:
>
> class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
>  def post(self):
>  upload_files = self.get_uploads('File')
>  blob_info = upload_files[0]
>  fotos = FOTO()
>  fotos.link = blob_info.key()
>  fotos.Tlink = images.get_serving_url(fotos.link, 94)
>  fotos.Glink = images.get_serving_url(fotos.link, 800)
>  fotos.put()
>
> Now I receive a PDF and I have to store an IMG.
> And I'm thinking to use the conversions tool as per below.
>
> from google.appengine.api import conversion
>
> # Create a conversion request from HTML to PNG.
> asset = conversion.Asset("text/html", "some data", "test.html")
> conversion_obj = conversion.Conversion(asset, "image/png")
>
> result = conversion.convert(conversion_obj)
> if result.assets:
>   # Note: in most cases, we will return data all in one asset.
>   # Except that we return multiple assets for multiple pages image.
>   for asset in result.assets:
> doSomethingWithAsset(asset.data)
> else:
>   handleError(result.error_code, result.error_text)
>
>
> My question is:
> How can I store the asset? Could I still use the way I was?
>
> Thanks
>
> Max
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/p2YUXLQ65I0J.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Images - app.yaml

2012-04-27 Thread Computer_Engineer
Patrik:
Try as 
- url: /(.*\.(gif|png|jpg))
  static_files: css/images//\1
  upload: css/images//(.*\.(gif|png|jpg))

On Sunday, April 22, 2012 3:50:39 PM UTC+3, Patrik wrote:
>
> Hello, 
> i have a problem with the app.yaml. 
> How i can integrate for my project? (python). 
>
> The images are in the directory /css/images/... 
>
> How should it look like in the app.yaml? 
>
>
> - url: /css/images/test.png 
>   static_files: css/images/test.png 
>   upload: css/images/test.png 
> Does not work :(

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/CALFLxkQmDoJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Compilation failing - anyone else seeing this?

2012-05-05 Thread Computer_Engineer
This problem can occur if an update is started and does not finish 
correctly. The correct thing to do is to give appcfg.py the rollback command

On Saturday, May 5, 2012 2:10:44 PM UTC+3, Kaan Soral wrote:
>
> I am seeing this output consistently for an hour, on several deployments:
>
> Error 503: --- begin server output ---
>
> Try Again (503)
> An unexpected failure has occurred. Please try again.
> --- end server output ---
> Precompilation failed. Your app can still serve but may have reduced 
> startup performance. You can retry the update later to retry the 
> precompilation step.
>
> Anyone else?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/AJWVfA7vBRMJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: "HTTP 404 File not found" for file downloads

2012-05-11 Thread Computer_Engineer
Hi Uma Jeyachandran:
*you should upload it as static file,this error because this file is 
considered in the local host and GAE doesn't find it, you should configure 
app.yaml and specify this *
*file in it , see this link for app.yaml configuration *
https://developers.google.com/appengine/docs/python/config/appconfig, you 
can go to the log for this application to see the error description.* *

On Friday, May 11, 2012 11:44:33 AM UTC+3, Uma Jeyachandran wrote:
>
> Hi 
>
> I have an application in appspot.com. When I attempting any file 
> download using  tag in html, it throws file not found error. 
>
> Please suggest solution. 
>
> Thank you 
> Umamageswari

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/ndrCX85-4D4J.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: "HTTP 404 File not found" for file downloads

2012-05-12 Thread Computer_Engineer
You are welcome:)

On Friday, May 11, 2012 11:44:33 AM UTC+3, Uma Jeyachandran wrote:
>
> Hi 
>
> I have an application in appspot.com. When I attempting any file 
> download using  tag in html, it throws file not found error. 
>
> Please suggest solution. 
>
> Thank you 
> Umamageswari

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/4oo4E8cWJakJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.