google-app-engine

Is there an equivalent to Rails’ “flash” messages in GAE (python)?

这一生的挚爱 提交于 2020-01-21 11:42:20
问题 Ruby on Rails has a way that you can set a message, like flash[:notice] and flash[:error , that the user will see at the next opportunity. It’s especially useful for things like notifying the user of failure to log in, etc., when they are redirected (e.g. back to a sign-in page). Is there a canonical or common way to achieve this on Google App Engine (Python API)? (Assume Django is not being used.) 回答1: Webapp framework, the simple web application framework that ships with GAE, does not

Is there an equivalent to Rails’ “flash” messages in GAE (python)?

我只是一个虾纸丫 提交于 2020-01-21 11:42:15
问题 Ruby on Rails has a way that you can set a message, like flash[:notice] and flash[:error , that the user will see at the next opportunity. It’s especially useful for things like notifying the user of failure to log in, etc., when they are redirected (e.g. back to a sign-in page). Is there a canonical or common way to achieve this on Google App Engine (Python API)? (Assume Django is not being used.) 回答1: Webapp framework, the simple web application framework that ships with GAE, does not

Nullpointerexception throws when inserting entity using Auto-generated Classendpoint insert method

时间秒杀一切 提交于 2020-01-21 07:04:15
问题 I am confused to using auto-generated endpoint class. I want to use generated endpoint to insert new object into datastore. But, an exception is throwing. fooEndpoint.insertFoo(foo); // throws null pointer exception My entity class is similar with the given example at this source: https://developers.google.com/appengine/docs/java/datastore/jpa/overview. Here is my entity: @Entity public class Foo { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Key ID; Here is the stack trace:

Error Response: [13] An internal error occurred while creating a Google Cloud Storage bucket

江枫思渺然 提交于 2020-01-21 05:32:07
问题 I am trying to push a Nodejs sample app Hello World but after pushing I am getting error. ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred while creating a Google Cloud Storage bucket. There is nothing wrong with the code as it is just a sample app downloaded from google. I have seen other SO posts related to this error but none of them helped. Can anyone please tell me a Fix for this error. I also tried to run command in debug using command and got following output.

Protobuf 2.5.0 bug?

限于喜欢 提交于 2020-01-20 08:29:06
问题 I've migrated from google protobuf v. 2.4.1 to v. 2.5.0 (no other change). I had a perfectly working client-server [android<>gae dev server] communication using 2.4.1. Now with 2.5.0 it is broken. Without any modification to the .proto file, I've setup my client and server with the new 2.5.0 jar, and with the new protoc executable I've generated a new source file for client and server from the same proto file. Now I get this error on the server when I'm trying to parse the message:

Google app engine deploy flask app - ImportError: libSM.so.6: cannot open shared object file: No such file or directory

社会主义新天地 提交于 2020-01-20 08:27:49
问题 I am trying to deploy a python flask app to google cloud. Once the app starts running I get the following error: File "/home/vmagent/app/app.py", line 11, in <module> import cv2 File "/env/lib/python3.4/site-packages/cv2/__init__.py", line 9, in <module> from .cv2 import * ImportError: libSM.so.6: cannot open shared object file: No such file or directory Doing some research on the problem, I figured out that this seems to be a problem related to opencv-python and the following line should

How to use Stackdriver Structured Logging in App Engine Flex Java environment

随声附和 提交于 2020-01-20 07:46:04
问题 Google App Engine flexible environment automatically pipes stdout and stderr to Stackdriver (Google Cloud Logging). But this only supports plain text log message without any metadata (not even logging levels). I found Logback appender for google cloud logging. https://cloud.google.com/logging/docs/setup/java But this does not seem to support structured logging yet. And also, it makes GRPC calls for every log entry under the hood. So, I wonder how scalable it is (especially compare to current

How to use unicode characters with PIL?

放肆的年华 提交于 2020-01-20 05:00:06
问题 I would like to add Russian text to the image. I use PIL 1.1.7 and Python 2.7 on Windows machine. Since PIL compiled without libfreetype library, I use the following on development server: font_text = ImageFont.load('helvR24.pil') draw.text((0, 0), 'Текст на русском', font=font_text) ( helvR24.pil is taken from http://effbot.org/media/downloads/pilfonts.zip) On Production environment I do the following: font_text = ImageFont.truetype('HelveticaRegular.ttf', 24, encoding="utf-8") draw.text((0,

Does Google App Engine support ftp?

强颜欢笑 提交于 2020-01-19 14:02:25
问题 Now I use my own Java FTP program to ftp objects from my PC to my ISP's website server. I want to use Google App Engine's servlet to get Paypal IPN messages, then store the messages into my own objects and ftp the objects to my ISP's website server, is this doable ? I heard Google App Engine doesn't support FTP. I don't expect Google to do it for me, but can I use my own Java FTP program in the web app that I upload onto the App Engine to do it ? Frank 回答1: No, you can't open any socket

Does Google App Engine support ftp?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-19 14:02:23
问题 Now I use my own Java FTP program to ftp objects from my PC to my ISP's website server. I want to use Google App Engine's servlet to get Paypal IPN messages, then store the messages into my own objects and ftp the objects to my ISP's website server, is this doable ? I heard Google App Engine doesn't support FTP. I don't expect Google to do it for me, but can I use my own Java FTP program in the web app that I upload onto the App Engine to do it ? Frank 回答1: No, you can't open any socket