- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
更新3
无奈之下,我创建了一个新的google appengine应用,该应用与原始应用相同,即使名称相同,但ID稍长。新应用程序具有-232619 added to the ID,原始应用程序具有简要信息ID。新应用程序可以按预期工作,但原始应用程序仍会产生NotAllowedError。
因此,根据我的判断,问题出在Google的系统中,但是我无法让Google的任何人为我提供解决方案,使我能够保留该应用程序的原始ID。似乎管理员必须删除我原来的名为Participoll的应用程序,但以某种方式让我替换了它。替换它会很复杂,因为应用程序创建系统还必须删除名称Participoll足够长时间,以便我可以再次声明应用程序名称/ ID。
因此,我在2个gae地方拥有相同的应用,两者的项目名称完全相同,但项目ID略有不同。具有愚蠢ID的应用程序可以运行,但是没有人可以帮助我使具有所需ID的应用程序运行。如何解决?我无法删除具有所需ID的应用,因为我会丢失所需名称。
Google有人可以在这里提供帮助吗?
更新3
更新2
Chrome与Firefox产生的结果不同。participoll.appspot.com
在Chrome上生成ApplicationError: 2
,在Safari和Firefox上生成Error: Server Error (500)
。participoll.appspot.com/admin
在Chrome上生成You are an administrator.
,在Safari和Firefox上生成You are not logged in.
。
因此,似乎所有3个人都以为我是管理员。但是,这三个人都没有要求我登录,而且除了在Google App Engine附带的Chrome中,我不知道如何强制注销或登录请求。
这会给任何人更多的想法吗?
更新2
更新1
最近,使用“经过修订的”简单应用程序,我收到了另一条更具描述性的错误消息,如下所示。新错误是指create_logout_url
而不是create_login_url
,并且500错误已消失。
由于原始的500 error
出现了-并没有因为我键入错误而消失,所以我暂时注释掉了登录请求并分配了login_url = 'login_url'
和logout_url = 'logout_url'
;也许这使500 error
消失了。这是令人鼓舞的,因为500 error
的信息不足。因此,也许这种变化暂时解决了其他问题。但是现在我收到了这个新错误。 (但是请参阅下文,因为Safari浏览器仍然具有500 error
。)
ApplicationError: 2
Traceback (most recent call last):
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__
return handler.dispatch()
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/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/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/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~participoll/1.418713147155852221/main.py", line 33, in get
logout_url = users.create_logout_url('/')
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/python27/python27_lib/versions/1/google/appengine/api/users.py", line 299, in create_logout_url
raise e
ApplicationError: ApplicationError: 2
Traceback (most recent call last):
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 273, in Handle
result = handler(dict(self._environ), self._StartResponse)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1519, in __call__
response = self._internal_error(e)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__
return handler.dispatch()
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/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/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/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~participoll/1.418713147155852221/main.py", line 33, in get
logout_url = users.create_logout_url('/')
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/a19f7fde5f64c33c/python27/python27_lib/versions/1/google/appengine/api/users.py", line 299, in create_logout_url
raise e
ApplicationError: ApplicationError: 2
500 error
。
application: participoll
version: 1
runtime: python27
threadsafe: yes
api_version: 1
handlers:
- url: .*
script: main.app
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Sample Google App Engine application that demonstrates using the Users API
For more information about App Engine, see README.md under /appengine.
"""
# [START all]
from google.appengine.api import users
import webapp2
class MainPage(webapp2.RequestHandler):
def get(self):
# [START user_details]
user = users.get_current_user()
if user:
nickname = user.nickname()
logout_url = users.create_logout_url('/')
greeting = 'Welcome, {}! (<a href="{}">sign out</a>)'.format(
nickname, logout_url)
else:
login_url = users.create_login_url('/')
greeting = '<a href="{}">Sign in</a>'.format(login_url)
# [END user_details]
self.response.write(
'<html><body>{}</body></html>'.format(greeting))
class AdminPage(webapp2.RequestHandler):
def get(self):
user = users.get_current_user()
if user:
if users.is_current_user_admin():
self.response.write('You are an administrator.')
else:
self.response.write('You are not an administrator.')
else:
self.response.write('You are not logged in.')
app = webapp2.WSGIApplication([
('/', MainPage),
('/admin', AdminPage)
], debug=True)
# [END all]
application: participoll
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /static
static_dir: static
- url: /favicon.ico
static_files: static/images/favicon.ico
upload: static/images/favicon.ico
- url: /.*
script: main.app
libraries:
- name: jinja2
version: "2.6"
- name: markupsafe
version: latest
builtins:
- remote_api: on
import webapp2
from views import MainHandler, TablePage, AddPerson, AddQuestion, Image
import os
app = webapp2.WSGIApplication([
('/', MainHandler),
('/table', TablePage),
('/add_person', AddPerson),
('/add_question', AddQuestion),
('/img', Image),
],
debug=True)
class MainHandler(BaseHandler):
def get(self):
ID_id = self.request.get("ID", None)
if ID_id == '':
ID_id = None
user = users.get_current_user()
if ID_id is None: #no ID has been set by the user
path = os.path.join(TEMPLATE_DIR, 'splash.html')
if user: #offer user or nonuser options back at choose_name.html
url = users.create_logout_url(self.request.uri)
url_linktext = 'Signout'
url_linktextmore = ' if you wish. You will be returned to this page after you signout.'
else:
url = users.create_login_url(self.request.uri)
url_linktext = 'Signin'
url_linktextmore = ' if you will be creating a page. You will be returned to this page after you signin.'
template_values = {
'url': url,
'url_linktext': url_linktext,
'url_linktextmore': url_linktextmore,
}
self.response.out.write(template.render(path, template_values))
最佳答案
开发服务器似乎并未实际使用Google帐户系统https://cloud.google.com/appengine/docs/standard/python/users/#Python_Google_accounts_and_the_development_server
关于堆栈溢出的一些问题似乎表明,获取NotAllowedError
意味着您可能需要在App Engine仪表板中进行一些额外的配置才能启用它
https://stackoverflow.com/a/19676826/4458510
NotAllowedError when trying to access AppStats
Create_login_url error after migrating to HRD (Google App Engine)
https://groups.google.com/forum/#!topic/google-appengine/xH__FhRXOCM
关于python - NotAllowedError create_login_url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54776771/
更新3 无奈之下,我创建了一个新的google appengine应用,该应用与原始应用相同,即使名称相同,但ID稍长。新应用程序具有-232619 added to the ID,原始应用程序具有简
我正在使用 ar.js,它使用用户网络摄像头并发出权限提示。我想要的是在用户允许或拒绝访问网络摄像头或之前已经这样做的情况下收听此对话触发的全局事件。 我试过像这样的全局听众: document.d
我突然得到一个 navigator.MediaDevices.getUserMedia notAllowedError 我不是一个月前。没有代码改变。我正在使用火狐 68.01。当我在 AWS 上运行
我尝试将主页 '/' 设置为用户登录或不登录,但我得到了一个NotAllowedError。这适用于本地服务器。但是,在真正的公用服务器中似乎不起作用。 NotAllowedError 是否意味着遵守
我们正在尝试制作视频 session 应用程序。在 Windows 上运行该应用程序进行测试时,视频打开得很好,但是当我们在物理设备(Android 手机)上运行它时,出现以下错误并且视频不显示。 E
我有一个简短的问题。当我按下一个使用 ajax 请求将数据获取到剪贴板的按钮时,我想在我的 iOS 设备上的剪贴板上添加一个文本。 使用我桌面上的浏览器和我的 Android 设备,它运行良好,但使用
我有一个带有按钮的简单页面,按下该按钮时,它使用异步剪贴板 API 写入剪贴板。 Test Clipboard function testClipboard() { nav
自上次 Safari 更新到版本 11 以来,一些视频停止播放。最糟糕的是,有时,就像五次尝试中一次,它会奏效。我认为原因是我的 JS 脚本集成了 Vimeo Player API,但结果是 Vime
我有一个正在制作的网站,这是一个非常旧的网站,我对彻底改造不感兴趣。 我有一个 Controller ,可以从 soundcloud 播放列表中获取一堆轨道,以及一些循环播放它们的代码
我有一个套件可以记录用户的网络摄像头和麦克风。它在网页上运行良好,但在 Chrome 扩展程序中: navigator.mediaDevices.getUserMedia({video: true,
基于 How-to guide 中的示例代码,我在 Google App Engine 中使用 users.create_login_url 的一个非常基本的示例遇到了问题。 .该示例在本地开发服务器
我的问题的沙盒演示:https://codesandbox.io/s/jolly-fermat-j23w9 我正在尝试在我的 React 网站上实现一个功能,用户点击一个元素,然后播放音频。 在桌面上
我有一个简单的页面,其中包含我通过 AJAX 请求处理的一些详细信息。 在 AJAX 调用成功回调时,我试图触发 navigator.share这给了我一个错误: NotAllowedError: M
我正在尝试开发一个 Chrome 扩展来访问网络摄像头并录制视频,并在停止后下载它。 扩展失败,调用以下代码行时出错: navigator.mediaDevices.getUserMedia({ au
客观化。预期行为:按下复制按钮后,文本将复制到手机剪贴板中。当前行为:按下复制按钮后,Ffltter InAppWebView抛出错误未捕获(在Promise中)NotAlledError:写入权限被
我是一名优秀的程序员,十分优秀!