yagop / telegram-bot

UNMAINTAINED - A Telegram Bot based on plugins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

using webhook in google app engine

jbhv12 opened this issue · comments

i tried to host a bot on gae which uses webhook. however google does not provide socket service on free account and i get following error: FeatureNotEnabledError: The Socket API will be enabled for this application once billing has been enabled in the admin console

full error:

Exception on /set_webhook [GET]
Traceback (most recent call last):
File "/base/data/home/apps/sbot3-1263/1.391677743694943952/lib/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/base/data/home/apps/s
bot3-1263/1.391677743694943952/lib/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/base/data/home/apps/sbot3-1263/1.391677743694943952/lib/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/base/data/home/apps/s
bot3-1263/1.391677743694943952/lib/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/base/data/home/apps/sbot3-1263/1.391677743694943952/lib/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/base/data/home/apps/s
bot3-1263/1.391677743694943952/bot_gae.py", line 33, in set_webhook
s = bot.setWebhook('https://bot3-1263.appspot.com/HOOK')
File "/base/data/home/apps/sbot3-1263/1.391677743694943952/lib/telepot/init.py", line 285, in setWebhook
timeout=self._http_timeout)
File "/base/data/home/apps/s
bot3-1263/1.391677743694943952/lib/requests/api.py", line 107, in post
return request('post', url, data=data, json=json, _kwargs)
File "/base/data/home/apps/sbot3-1263/1.391677743694943952/lib/requests/api.py", line 53, in request
return session.request(method=method, url=url, *kwargs)
File "/base/data/home/apps/s
bot3-1263/1.391677743694943952/lib/requests/sessions.py", line 468, in request
resp = self.send(prep, *send_kwargs)
File "/base/data/home/apps/sbot3-1263/1.391677743694943952/lib/requests/sessions.py", line 576, in send
r = adapter.send(request, *kwargs)
File "/base/data/home/apps/s
bot3-1263/1.391677743694943952/lib/requests/adapters.py", line 376, in send
timeout=timeout
File "/base/data/home/apps/sbot3-1263/1.391677743694943952/lib/requests/packages/urllib3/connectionpool.py", line 559, in urlopen
body=body, headers=headers)
File "/base/data/home/apps/s
bot3-1263/1.391677743694943952/lib/requests/packages/urllib3/connectionpool.py", line 345, in _make_request
self._validate_conn(conn)
File "/base/data/home/apps/sbot3-1263/1.391677743694943952/lib/requests/packages/urllib3/connectionpool.py", line 784, in _validate_conn
conn.connect()
File "/base/data/home/apps/s
bot3-1263/1.391677743694943952/lib/requests/packages/urllib3/connection.py", line 217, in connect
conn = self._new_conn()
File "/base/data/home/apps/sbot3-1263/1.391677743694943952/lib/requests/packages/urllib3/connection.py", line 137, in _new_conn
(self.host, self.port), self.timeout, *_extra_kw)
File "/base/data/home/apps/s
bot3-1263/1.391677743694943952/lib/requests/packages/urllib3/util/connection.py", line 67, in create_connection
for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/remote_socket/_remote_socket.py", line 339, in getaddrinfo
canonical=(flags & AI_CANONNAME))
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/remote_socket/_remote_socket.py", line 212, in _Resolve
canon, aliases, addresses = _ResolveName(name, families)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/remote_socket/_remote_socket.py", line 230, in _ResolveName
apiproxy_stub_map.MakeSyncCall('remote_socket', 'Resolve', request, reply)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 95, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 329, in MakeSyncCall
rpc.CheckSuccess()
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_rpc.py", line 134, in CheckSuccess
raise self.exception
FeatureNotEnabledError: The Socket API will be enabled for this application once billing has been enabled in the admin console.

any help on this???any other alternative that i can use?? can i use .getMessage() method? how?
repo: https://github.com/jbhv12/bot3.git

commented

According with the log you are using telepot. Ask them please.