[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3854: builtins.TypeError: write() argument must be str, not bytes from allmydata/webish.py usage of FileUploadFieldStorage
Tahoe-LAFS
trac at tahoe-lafs.org
Tue Jan 4 16:32:27 UTC 2022
#3854: builtins.TypeError: write() argument must be str, not bytes from
allmydata/webish.py usage of FileUploadFieldStorage
---------------------+---------------------------
Reporter: exarkun | Owner:
Type: defect | Status: new
Priority: normal | Milestone: undecided
Component: unknown | Version: n/a
Keywords: | Launchpad Bug:
---------------------+---------------------------
On Python 3.9 when issuing some request to the Tahoe-LAFS web API, this
traceback comes up:
{{{
2022-01-04T10:36:04-0500 [_GenericHTTPChannelProtocol,1,127.0.0.1]
Unhandled Error
Traceback (most recent call last):
File "python3.9/site-packages/twisted/python/log.py", line 103,
in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "python3.9/site-packages/twisted/python/log.py", line 86,
in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "python3.9/site-packages/twisted/python/context.py", line
122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args,
**kw)
File "python3.9/site-packages/twisted/python/context.py", line
85, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "python3.9/site-packages/twisted/internet/posixbase.py",
line 614, in _doReadOrWrite
why = selectable.doRead()
File "python3.9/site-packages/twisted/internet/tcp.py", line
243, in doRead
return self._dataReceived(data)
File "python3.9/site-packages/twisted/internet/tcp.py", line
249, in _dataReceived
rval = self.protocol.dataReceived(data)
File "python3.9/site-packages/twisted/web/http.py", line 3024,
in dataReceived
return self._channel.dataReceived(data)
File "python3.9/site-packages/twisted/web/http.py", line 2305,
in dataReceived
return basic.LineReceiver.dataReceived(self, data)
File "python3.9/site-packages/twisted/protocols/basic.py", line
579, in dataReceived
why = self.rawDataReceived(data)
File "python3.9/site-packages/twisted/web/http.py", line 2312,
in rawDataReceived
self._transferDecoder.dataReceived(data)
File "python3.9/site-packages/twisted/web/http.py", line 1755,
in dataReceived
finishCallback(data[contentLength:])
File "python3.9/site-packages/twisted/web/http.py", line 2171,
in _finishRequestBody
self.allContentReceived()
File "python3.9/site-packages/twisted/web/http.py", line 2284,
in allContentReceived
req.requestReceived(command, path, version)
File "python3.9/site-packages/allmydata/webish.py", line 134, in
requestReceived
self.fields = FileUploadFieldStorage(
File "python3.9/cgi.py", line 482, in __init__
self.read_single()
File "python3.9/cgi.py", line 675, in read_single
self.read_binary()
File "python3.9/cgi.py", line 697, in read_binary
self.file.write(data)
builtins.TypeError: write() argument must be str, not bytes
}}}
I'm not exactly sure yet what request triggers this.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3854>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list