int()的基数为10的文字无效:'(invalid literal for int() with base 10: ')
我最近在我的项目中添加了用于错误跟踪的哨兵,并根据此处的文档配置了raven,但是得到了如下所示的错误。
settings.py
import raven INSTALLED_APPS = [ # 3rd party app 'raven.contrib.django.raven_compat', ] RAVEN_CONFIG = { 'dsn': 'https://*****@sentry.io/224093', 'release': raven.fetch_git_sha(os.path.dirname(os.pardir)), }
错误日志
System check identified no issues (0 silenced). October 02, 2017 - 11:31:58 Django version 1.10, using settings 'FoodCham.settings.development' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Sending message of length 2240 to https://sentry.io/api/224093/store/ Internal Server Error: / Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 39, in inner response = get_response(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 244, in _legacy_get_response response = middleware_method(request) File "/usr/local/lib/python2.7/dist-packages/raven/contrib/django/middleware/__init__.py", line 135, in process_request request.body # forces stream to be read into memory File "/usr/local/lib/python2.7/dist-packages/django/http/request.py", line 267, in body int(self.META.get('CONTENT_LENGTH', 0)) > settings.DATA_UPLOAD_MAX_MEMORY_SIZE): ValueError: invalid literal for int() with base 10: '' Internal Server Error: / Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 39, in inner response = get_response(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 244, in _legacy_get_response response = middleware_method(request) File "/usr/local/lib/python2.7/dist-packages/raven/contrib/django/middleware/__init__.py", line 135, in process_request request.body # forces stream to be read into memory File "/usr/local/lib/python2.7/dist-packages/django/http/request.py", line 267, in body int(self.META.get('CONTENT_LENGTH', 0)) > settings.DATA_UPLOAD_MAX_MEMORY_SIZE): ValueError: invalid literal for int() with base 10: '' [02/Oct/2017 11:32:04] "GET / HTTP/1.1" 500 69274
任何有用的答案将不胜感激!
I recently added sentry for error tracking in my project and configure raven according to documentation here but getting the error shown below.
settings.py
import raven INSTALLED_APPS = [ # 3rd party app 'raven.contrib.django.raven_compat', ] RAVEN_CONFIG = { 'dsn': 'https://*****@sentry.io/224093', 'release': raven.fetch_git_sha(os.path.dirname(os.pardir)), }
Error Log
System check identified no issues (0 silenced). October 02, 2017 - 11:31:58 Django version 1.10, using settings 'FoodCham.settings.development' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Sending message of length 2240 to https://sentry.io/api/224093/store/ Internal Server Error: / Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 39, in inner response = get_response(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 244, in _legacy_get_response response = middleware_method(request) File "/usr/local/lib/python2.7/dist-packages/raven/contrib/django/middleware/__init__.py", line 135, in process_request request.body # forces stream to be read into memory File "/usr/local/lib/python2.7/dist-packages/django/http/request.py", line 267, in body int(self.META.get('CONTENT_LENGTH', 0)) > settings.DATA_UPLOAD_MAX_MEMORY_SIZE): ValueError: invalid literal for int() with base 10: '' Internal Server Error: / Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 39, in inner response = get_response(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 244, in _legacy_get_response response = middleware_method(request) File "/usr/local/lib/python2.7/dist-packages/raven/contrib/django/middleware/__init__.py", line 135, in process_request request.body # forces stream to be read into memory File "/usr/local/lib/python2.7/dist-packages/django/http/request.py", line 267, in body int(self.META.get('CONTENT_LENGTH', 0)) > settings.DATA_UPLOAD_MAX_MEMORY_SIZE): ValueError: invalid literal for int() with base 10: '' [02/Oct/2017 11:32:04] "GET / HTTP/1.1" 500 69274
Any helpful answer will be appreciated!
原文:https://stackoverflow.com/questions/46520371
最满意答案
不可能。
Opera是一个外部Android应用程序,您可以为它提供的只是一个URL。 此URL必须包含登录参数。 WebView是一个UI组件,可以让您更好地控制它。
如果您无法更改Web服务器以支持login-by-magical-URL,那么您可能不幸运。
There is no way.
Opera is an external Android app and all you can give for it is an URL. This URL must contain login parameters. WebView is an UI component which gives you much greater control over it.
If you cannot change the web server to support login-by-magical-URL then you are probably out of the luck.
相关问答
更多-
通过在Android上更新Opera浏览器已解决此问题。 This issue has been resolved by updateing Opera browser on Android.
-
一个简单的: white-space: nowrap; 到#menu类修复了这个问题。 A simple: white-space: nowrap; to the #menu class fixed this problem.
-
使用opera / Chrome mobile执行Android phonegap应用(Execute Android phonegap app with opera/Chrome mobile)[2022-01-25]
PhoneGap for Android使用WebView ,而不是浏览器。 最简单的解决方案是为PhoneGap使用Web套接字插件 ,或者如果找不到您喜欢的现有插件,则编写自己的插件。 理论上可以重写PhoneGap以使用Android版本的Chromium,但这将是一项艰巨的任务。 PhoneGap for Android uses WebView, not a browser. The simplest solution is to use a Web sockets plugin for Phon ... -
如何将应用内购买添加到Opera Mobile Store的应用中(How to add In app Purchasing to apps for Opera Mobile Store)[2023-03-17]
感谢您的留言。 目前我们不提供应用内付款,但这可能会在下一年发生变化。 您现在可以做的是集成任何三维派对应用程序内支付解决方案,并将此类应用程序提交到Opera Mobile Store。 这可能是来自Boku,Zong,iFree,MoPay等提供商的短信付款,也可能是通过PayPal,Google Checkout等进行的应用内付款。 最诚挚的问候,Victor Shaburov - apps.opera.com thank you for your message. Currently we don' ... -
看到这个和这个问题的方法来检测浏览器是否支持JQM, 这是检查Cookie。 这两个答案都来自于stackoverflow :) By design, the primary UI selector for my app is the user. I do not want to delegate that to a detection script. The bit of detection in question is just to give a clever default. It is a ris ...
-
fontawesome和bootstrap等网站上的图标通常使用自定义字体,然后使用font-face CSS规则进行设置。 Opera Mini目前不支持font-face 。 http://caniuse.com/#feat=fontface 阅读以下链接,看起来Opera Mini不允许自定义字体,而是使用设备上可用的字体。 http://dev.opera.com/articles/view/opera-mini-web-content-authoring-guidelines/#typograph ...
-
我实际上放弃了这一点,因为我认为它根本不会很好。 只是不是一个非常好的用户体验。 我所使用的是在没有滚动或分页的情况下完整显示表格。 所以,我纯粹依赖于浏览器的滚动功能。 它似乎在我的黑莓手机上运行得非常好,我觉得在触摸式智能手机上使用也很好,因为用户只需用拇指/手指滑动即可向下滚动并查看列表。 然后只需向后滑动到列表顶部即可按相关按钮。 实际上,考虑到它,我可能会在网格下提供一个“返回顶部”链接:) I actually gave up on this, as I don't think it would ...
-
我利用新的History API解决了这个问题: // snippet goes in the setup/DOMContentLoaded phase if (typeof window.onbeforeunload !== "undefined") { // [standard warnings and whatnot here for non-Opera users] } else { // [optionally include checks for history supp ...
-
不可能。 Opera是一个外部Android应用程序,您可以为它提供的只是一个URL。 此URL必须包含登录参数。 WebView是一个UI组件,可以让您更好地控制它。 如果您无法更改Web服务器以支持login-by-magical-URL,那么您可能不幸运。 There is no way. Opera is an external Android app and all you can give for it is an URL. This URL must contain login paramet ...
-
有人知道我们可以在某种程度上将Opera Mobile嵌入我们自己的应用程序吗? 只有Opera以库的形式提供,而不是AFAIK。 标准浏览器是不可接受的。 您不能将您认为“标准浏览器”的任何内容嵌入到您的应用中。 “标准浏览器”是一个应用程序,而不是库,您无法将其他应用程序的UI嵌入到您自己的UI中。 您可以嵌入WebView ,完全有可能是Android的HTML渲染库(例如,来自Firefox的Gecko)。 Is anyone aware of a way we can embed Opera Mo ...