Title: Python 3.x and empty file (b'') using FieldStorageUploadConverter · Issue #101 · formencode/formencode · GitHub
Open Graph Title: Python 3.x and empty file (b'') using FieldStorageUploadConverter · Issue #101 · formencode/formencode
X Title: Python 3.x and empty file (b'') using FieldStorageUploadConverter · Issue #101 · formencode/formencode
Description: Using Pyramid and Python 3.4. When I leave an input type="file" name="file" empty, the request.POST has {'file': b' '}. b' ' is iterable, so formencode raises singleValueExpected=_('Please provide only one value') Python 3.4.3 (default, ...
Open Graph Description: Using Pyramid and Python 3.4. When I leave an input type="file" name="file" empty, the request.POST has {'file': b' '}. b' ' is iterable, so formencode raises singleValueExpected=_('Please provide ...
X Description: Using Pyramid and Python 3.4. When I leave an input type="file" name="file" empty, the request.POST has {'file': b' '}. b' ' is iterable, so formencode r...
Opengraph URL: https://github.com/formencode/formencode/issues/101
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python 3.x and empty file (b'') using FieldStorageUploadConverter","articleBody":"Using Pyramid and Python 3.4.\nWhen I leave an input type=\"file\" name=\"file\" empty, the request.POST has {'file': b' '}.\nb' ' is iterable, so formencode raises singleValueExpected=_('Please provide only one value')\n\n```\nPython 3.4.3 (default, Jul 28 2015, 18:20:59) \n[GCC 4.8.4] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> from formencode import Schema, validators\n>>> class FileSchema(Schema):\n... file = validators.FieldStorageUploadConverter()\n... \n>>> FileSchema().to_python({\"file\": b''})\nTraceback (most recent call last):\n File \"\u003cstdin>\", line 1, in \u003cmodule>\n File \"/home/aj/.virtualenvs/marketplace/lib/python3.4/site-packages/formencode/api.py\", line 476, in to_python\n value = tp(value, state)\n File \"/home/aj/.virtualenvs/marketplace/lib/python3.4/site-packages/formencode/schema.py\", line 217, in _convert_to_python\n value_dict, state, error_dict=errors)\nformencode.api.Invalid: file: Please provide only one value\n>>>\n```\n","author":{"url":"https://github.com/antoniojesvs","@type":"Person","name":"antoniojesvs"},"datePublished":"2015-12-03T18:44:03Z","url":"https://github.com/formencode/formencode/issues/101"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3cd81338-e265-3e05-8d56-c58d4babdfa1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9EFC:1E3B91:130443:19FE4E:6B0464D8 |
| html-safe-nonce | ed2538ea03d20ede2d385a51a803fb6997cb24e68a1a036366efee5dc32fe376 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUZDOjFFM0I5MToxMzA0NDM6MTlGRTRFOjZCMDQ2NEQ4IiwidmlzaXRvcl9pZCI6IjQ0MDAxMDk1NDQ2MDU1MDg4MjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5bd68fce47b81350cc529d436809088de5761951d1a35ee416586cabb344ec9c |
| hovercard-subject-tag | issue:120240874 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/formencode/formencode/101/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e356ccaa938c47640b2e2580aa8893a7e4c138135201e487d485f2e030da5c42/formencode/formencode/issues/101 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e356ccaa938c47640b2e2580aa8893a7e4c138135201e487d485f2e030da5c42/formencode/formencode/issues/101 |
| og:image:alt | Using Pyramid and Python 3.4. When I leave an input type="file" name="file" empty, the request.POST has {'file': b' '}. b' ' is iterable, so formencode raises singleValueExpected=_('Please provide ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | antoniojesvs |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6 |
| turbo-cache-control | no-preview |
| go-import | github.com/formencode/formencode git https://github.com/formencode/formencode.git |
| octolytics-dimension-user_id | 1541742 |
| octolytics-dimension-user_login | formencode |
| octolytics-dimension-repository_id | 3733133 |
| octolytics-dimension-repository_nwo | formencode/formencode |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3733133 |
| octolytics-dimension-repository_network_root_nwo | formencode/formencode |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 03e114520787ad27289207f153520ef97461127c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width