Hello Mr. Pyle,
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.12.13/x64/bin/dainstall", line 6, in <module>
sys.exit(dainstall())
^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docassemblecli/commands.py", line 527, in dainstall
do_install(args, apikey, apiurl, to_ignore)
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/docassemblecli/commands.py", line 765, in do_install
r = requests.post(apiurl + '/api/package', data=data, files={'zip': archive}, headers={'X-API-Key': apikey}, timeout=50)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/requests/api.py", line 134, in post
return request("post", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/requests/api.py", line 71, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/requests/sessions.py", line 635, in request
prep = self.prepare_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/requests/sessions.py", line 541, in prepare_request
p.prepare(
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/requests/models.py", line 442, in prepare
self.prepare_body(data, files, json)
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/requests/models.py", line 635, in prepare_body
(body, content_type) = self._encode_files(files, raw_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/requests/models.py", line 250, in _encode_files
body, content_type = encode_multipart_formdata(new_fields)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/urllib3/filepost.py", line 81, in encode_multipart_formdata
body.write(data)
TypeError: a bytes-like object is required, not '_TemporaryFileWrapper'
dainstall --apiurl "$DA_URL" --apikey "$DA_API_KEY" --noconfig docassemble-dws_utils
Hello Mr. Pyle,
I've noticed that
dainstalldoes not work with therequestspackage since2.34. I've encountered this in our GitHub Actions Pipeline which uses Python 3.12. Here's a full list of dependencies which thepip install docassembleclicommand installed when it was broken:and here's the stack trace:
for this command:
The current fix I've found to work is to run this instead:
pip install docassemblecli requests==2.33