I'm trying to run an application for AppEngine with python where I'm import the example module to get data from Google Analytics https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/service-py but when I run the server with dev_appserver.py and go to localhost:8080/ I recive an 505 error with his error in the console:
Traceback (most recent call last):
File "/home/ingdavid/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.3/webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "/home/ingdavid/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.3/webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "/home/ingdavid/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/home/ingdavid/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.3/webapp2.py", line 1077, in __call__
return handler.dispatch()
File "/home/ingdavid/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.3/webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "/home/ingdavid/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.3/webapp2.py", line 545, in dispatch
return method(*args, **kwargs)
File "/var/www/repositorios/PYTHON/dashboard/app.py", line 248, in get
print analyticsH.main()
File "/var/www/repositorios/PYTHON/dashboard/analyticsH.py", line 111, in main
service_account_email)
File "/var/www/repositorios/PYTHON/dashboard/analyticsH.py", line 35, in get_service
scope=scope)
File "/var/www/repositorios/PYTHON/dashboard/oauth2client/util.py", line 137, in positional_wrapper
return wrapped(*args, **kwargs)
File "/var/www/repositorios/PYTHON/dashboard/oauth2client/client.py", line 1503, in __init__ _RequireCryptoOrDie()
File "/var/www/repositorios/PYTHON/dashboard/oauth2client/client.py", line 1457, in _RequireCryptoOrDie
raise CryptoUnavailableError('No crypto library available')
CryptoUnavailableError: No crypto library available
I've searched and all that I've found is install openssl or install python-crypto or update python-dev, I doing everything but not works.
Thank you.
Related
all modules has been installed correctly since I restored it from a working backup.
the problem is, it doesn't read properly. does anyone know how to fix this?
2022-02-15 02:40:22,799 31154 ERROR tester werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 193, in execute
application_iter = app(environ, start_response)
File "/home/ria/olive/tigernixerp11/odoo/service/server.py", line 292, in app
return self.app(e, s)
File "/home/ria/olive/tigernixerp11/odoo/service/wsgi_server.py", line 166, in application
return application_unproxied(environ, start_response)
File "/home/ria/olive/tigernixerp11/odoo/service/wsgi_server.py", line 154, in application_unproxied
result = handler(environ, start_response)
File "/home/ria/olive/tigernixerp11/odoo/http.py", line 1321, in __call__
return self.dispatch(environ, start_response)
File "/home/ria/olive/tigernixerp11/odoo/http.py", line 1295, in __call__
return self.app(environ, start_wrapped)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/wsgi.py", line 599, in __call__
return self.app(environ, start_response)
File "/home/ria/olive/tigernixerp11/odoo/http.py", line 1510, in dispatch
result = ir_http._dispatch()
File "/home/ria/olive/tigernixerp11/addons/auth_signup/models/ir_http.py", line 19, in _dispatch
return super(Http, cls)._dispatch()
File "/home/ria/olive/tigernixerp11/addons/web_editor/models/ir_http.py", line 22, in _dispatch
return super(IrHttp, cls)._dispatch()
File "/home/ria/olive/tigernixerp11/addons/http_routing/models/ir_http.py", line 322, in _dispatch
rule, arguments = cls._find_handler(return_rule=True)
File "/home/ria/olive/tigernixerp11/odoo/addons/base/ir/ir_http.py", line 84, in _find_handler
return cls.routing_map().bind_to_environ(request.httprequest.environ).match(return_rule=return_rule)
File "/home/ria/olive/tigernixerp11/odoo/addons/base/ir/ir_http.py", line 238, in routing_map
cls._routing_map = http.routing_map(mods, False, converters=cls._get_converters())
File "/home/ria/olive/tigernixerp11/odoo/http.py", line 988, in routing_map
routing_map.add(werkzeug.routing.Rule(url, endpoint=endpoint, methods=routing['methods'], **kw))
File "/usr/local/lib/python3.6/dist-packages/werkzeug/routing.py", line 1197, in add
rule.bind(self)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/routing.py", line 681, in bind
self.compile()
File "/usr/local/lib/python3.6/dist-packages/werkzeug/routing.py", line 731, in compile
_build_regex(self.is_leaf and self.rule or self.rule.rstrip('/'))
File "/usr/local/lib/python3.6/dist-packages/werkzeug/routing.py", line 721, in _build_regex
variable, converter, c_args, c_kwargs)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/routing.py", line 689, in get_converter
raise LookupError('the converter %r does not exist' % converter_name)
LookupError: the converter 'str' does not exist
restoring in another computer doesn't seem to have any problem butthis computer seems to be unable to read properly
Currently I'm testing appengine-crowdguru-python this app by sending xmpp messages from http://localhost:8000/xmpp which has a form to post data .. I have filled from, to, chat (message) fields.
From : avinash#app-live.appspotchat.com
To : ajin#app-live.appspotchat.com
Chat: /tellme Who is Clinton?
where app-live app-id is currently on live. I also changed from and to fields to the ids like avi#xmpp.jp where this account is created through https://www.xmpp.jp/signup but it still shows invalid JID..
ERROR 2016-06-06 08:45:32,157 wsgi.py:280]
Traceback (most recent call last):
File "/home/gemini/softwares/google_appengine/google/appengine/runtime/wsgi.py", line 268, in Handle
result = handler(dict(self._environ), self._StartResponse)
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 1519, in __call__
response = self._internal_error(e)
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 1077, in __call__
return handler.dispatch()
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "/home/gemini/softwares/google_appengine/google/appengine/ext/webapp/xmpp_handlers.py", line 63, in handle_exception
super(BaseHandler, self).handle_exception(exception, debug_mode)
File "/home/gemini/softwares/google_appengine/lib/webapp2-2.3/webapp2.py", line 545, in dispatch
return method(*args, **kwargs)
File "/home/gemini/PycharmProjects/appengine-crowdguru-python/guru.py", line 222, in post
super(XmppHandler, self).post()
File "/home/gemini/softwares/google_appengine/google/appengine/ext/webapp/xmpp_handlers.py", line 73, in post
self.message_received(self.xmpp_message)
File "/home/gemini/softwares/google_appengine/google/appengine/ext/webapp/xmpp_handlers.py", line 118, in message_received
handler(message)
File "/home/gemini/PycharmProjects/appengine-crowdguru-python/guru.py", line 302, in tellme_command
message.reply(WAIT_MSG)
File "/home/gemini/softwares/google_appengine/google/appengine/api/xmpp/__init__.py", line 515, in reply
message_type=message_type, raw_xml=raw_xml)
File "/home/gemini/softwares/google_appengine/google/appengine/api/xmpp/__init__.py", line 346, in send_message
raise InvalidJidError()
InvalidJidError
A common behaviour of "get Jid" it's error if Resource (in login phase) it's not definied due to the Jid composition ( user # server /resource). A "full jid" it's complete of Resource, so if it's null you can have a null pointer and so an error.
How to handle:
SOLUTION 1: retrive just "bare Jid"
SOLUTION 2: define a resource (it's a custom name that represent your client).
Hope that's help.
trying to use big query on google app engine python. I am trying to achieve this using a this client library . I have imported every necessary library and somehow running the snippet below
from bigquery import get_client
# BigQuery project id as listed in the Google Developers Console.
project_id = 'project_id'
# Service account email address as listed in the Google Developers Console.
service_account = 'my_id_123#developer.gserviceaccount.com'
# PKCS12 or PEM key provided by Google.
key = 'key.pem'
client = get_client(project_id, service_account=service_account,
private_key_file=key, readonly=True)
and still get the error:
2015-10-26 19:08:37 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=19090', '--admin_port=9010', 'C:\\Users\\CrowdStar\\workspace\\AppEngineThinkStudio\\TrafficTestCase']"
INFO 2015-10-26 19:08:39,540 devappserver2.py:726] Skipping SDK update check.
INFO 2015-10-26 19:08:39,634 api_server.py:172] Starting API server at: http://localhost:61626
INFO 2015-10-26 19:08:39,634 dispatcher.py:186] Starting module "default" running at: http://localhost:19090
INFO 2015-10-26 19:08:39,651 admin_server.py:118] Starting admin server at: http://localhost:9010
INFO 2015-10-26 18:08:44,361 discovery.py:240] URL being requested: GET https://www.googleapis.com/discovery/v1/apis/bigquery/v2/rest?userIp=%3A%3A1
INFO 2015-10-26 18:08:44,361 client.py:563] Attempting refresh to obtain initial access_token
ERROR 2015-10-26 18:08:44,365 webapp2.py:1528] RSA key format is not supported
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 1077, in __call__
return handler.dispatch()
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 545, in dispatch
return method(*args, **kwargs)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\main.py", line 72, in get
private_key_file=key, readonly=True)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\bigquery\client.py", line 83, in get_client
readonly=readonly)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\bigquery\client.py", line 101, in _get_bq_service
service = build('bigquery', 'v2', http=http)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\util.py", line 142, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\googleapiclient\discovery.py", line 196, in build
cache)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\googleapiclient\discovery.py", line 242, in _retrieve_discovery_doc
resp, content = http.request(actual_url)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\client.py", line 565, in new_request
self._refresh(request_orig)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\client.py", line 835, in _refresh
self._do_refresh_request(http_request)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\client.py", line 862, in _do_refresh_request
body = self._generate_refresh_request_body()
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\client.py", line 1541, in _generate_refresh_request_body
assertion = self._generate_assertion()
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\client.py", line 1670, in _generate_assertion
private_key, self.private_key_password), payload)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\_pycrypto_crypt.py", line 121, in from_string
pkey = RSA.importKey(parsed_pem_key)
File "C:\Python27\lib\site-packages\pycrypto-2.6.1-py2.7-win32.egg\Crypto\PublicKey\RSA.py", line 665, in importKey
return self._importKeyDER(der)
File "C:\Python27\lib\site-packages\pycrypto-2.6.1-py2.7-win32.egg\Crypto\PublicKey\RSA.py", line 588, in _importKeyDER
raise ValueError("RSA key format is not supported")
ValueError: RSA key format is not supported
ERROR 2015-10-26 18:08:44,372 wsgi.py:279]
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\wsgi.py", line 267, in Handle
result = handler(dict(self._environ), self._StartResponse)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 1519, in __call__
response = self._internal_error(e)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 1077, in __call__
return handler.dispatch()
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 545, in dispatch
return method(*args, **kwargs)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\main.py", line 72, in get
private_key_file=key, readonly=True)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\bigquery\client.py", line 83, in get_client
readonly=readonly)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\bigquery\client.py", line 101, in _get_bq_service
service = build('bigquery', 'v2', http=http)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\util.py", line 142, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\googleapiclient\discovery.py", line 196, in build
cache)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\googleapiclient\discovery.py", line 242, in _retrieve_discovery_doc
resp, content = http.request(actual_url)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\client.py", line 565, in new_request
self._refresh(request_orig)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\client.py", line 835, in _refresh
self._do_refresh_request(http_request)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\client.py", line 862, in _do_refresh_request
body = self._generate_refresh_request_body()
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\client.py", line 1541, in _generate_refresh_request_body
assertion = self._generate_assertion()
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\client.py", line 1670, in _generate_assertion
private_key, self.private_key_password), payload)
File "C:\Users\CrowdStar\workspace\AppEngineThinkStudio\TrafficTestCase\oauth2client\_pycrypto_crypt.py", line 121, in from_string
pkey = RSA.importKey(parsed_pem_key)
File "C:\Python27\lib\site-packages\pycrypto-2.6.1-py2.7-win32.egg\Crypto\PublicKey\RSA.py", line 665, in importKey
return self._importKeyDER(der)
File "C:\Python27\lib\site-packages\pycrypto-2.6.1-py2.7-win32.egg\Crypto\PublicKey\RSA.py", line 588, in _importKeyDER
raise ValueError("RSA key format is not supported")
ValueError: RSA key format is not supported
INFO 2015-10-26 19:08:44,404 module.py:737] default: "GET / HTTP/1.1" 500 -
This is the error I get when I try to configure apprtc with my own url. I tried to set up my own Turn Server and also tried to give a client url but it still did not work .
<HttpError 404 when requesting https://www.googleapis.com/bigquery/v2/projects/esuioswebrtc/datasets/prod/tables/analytics/insertAll?alt=json returned "Not Found: Table esuioswebrtc:prod.analytics">
Traceback (most recent call last):
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__
return handler.dispatch()
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/s~esuioswebrtc/2.382445032671238924/apprtc.py", line 503, in post
result = add_client_to_room(self.request, room_id, client_id, is_loopback)
File "/base/data/home/apps/s~esuioswebrtc/2.382445032671238924/apprtc.py", line 373, in add_client_to_room
host=request.host)
File "/base/data/home/apps/s~esuioswebrtc/2.382445032671238924/analytics.py", line 114, in report_event
analytics.report_event(*args, **kwargs)
File "/base/data/home/apps/s~esuioswebrtc/2.382445032671238924/analytics.py", line 94, in report_event
body=obj).execute()
File "/base/data/home/apps/s~esuioswebrtc/2.382445032671238924/third_party/oauth2client/util.py", line 132, in positional_wrapper
return wrapped(*args, **kwargs)
File "/base/data/home/apps/s~esuioswebrtc/2.382445032671238924/third_party/apiclient/http.py", line 723, in execute
raise HttpError(resp, content, uri=self.uri)
HttpError: <HttpError 404 when requesting https://www.googleapis.com/bigquery/v2/projects/esuioswebrtc/datasets/prod/tables/analytics/insertAll?alt=json returned "Not Found: Table esuioswebrtc:prod.analytics">
In order to use insertAll to stream data into a table, you must first create the table and give it the schema you will use.
You should pre-create the table out of band from your streaming insert process, since the rate limits on these apis differ drastically. For scenarios where you stream data into daily tables, we recommend that you pre-create the next few days of tables on some sort of cron process so they are ready for data before you need to stream into them.
My problem when trying to resize an image using the image class in google app engine.
The error is displayed below. This happens for every type of image including .jpg,.png,etc
Internal Server Error
The server has either erred or is incapable of performing the requested operation.
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1535, in __call__
rv = self.handle_exception(request, response, e)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1529, in __call__
rv = self.router.dispatch(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1102, in __call__
return handler.dispatch()
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "C:\Users\prudhvir\Desktop\projectbyprudhviraj\main.py", line 252, in post
avatar = images.resize(user_dp, 32, 32)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\images\__init__.py", line 1095, in resize
return rpc.get_result()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\apiproxy_stub_map.py", line 612, in get_result
return self.__get_result_hook(self)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\images\__init__.py", line 886, in execute_transforms_hook
raise _ToImagesError(e, self._blob_key)
BadImageError