Houdini 21 and ayon package dependency issues

Hey there,

We recently had an artist want to use the AMD material library, but found it wasn’t working in ayon for houdini 21 (20.5 however did work). Seemed to be down to the ayon dependency of aiohttp wasn’t compatible with what bundled with houdini. So we put the houdini libraries at the beginning of the PYTHONPATH, but now the artist cannot publish. Gets the following error:

INFO: Uploading reviewable <JOB>/sandbox/<USER>/PUBLISH/3D/fx__ferrofluid/<USER>_review_Main_h264_v001/<USER>_review_Main_h264_v001.mp4
INFO: Uploading '<JOB>/sandbox/<USER>/PUBLISH/3D/fx__ferrofluid/<USER>_review_Main_h264_v001/<USER>_review_Main_h264_v001.mp4' (size: 1.5MiB)
DEBUG: <URL>:443 "POST /projects/hondaBrand2026_05094/versions/966c02b0335611f1a0523cecef9e6e32/reviewables?label=h264 HTTP/1.1" 405 31
Traceback (most recent call last):
  File "/media/software/sidefx/hfs21.0.512-gcc11.2/python/lib/python3.11/site-packages/urllib3/response.py", line 710, in _error_catcher
    yield
  File "/media/software/sidefx/hfs21.0.512-gcc11.2/python/lib/python3.11/site-packages/urllib3/response.py", line 835, in _raw_read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
urllib3.exceptions.IncompleteRead: IncompleteRead(0 bytes read, 31 more expected)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/media/software/sidefx/hfs21.0.512-gcc11.2/python/lib/python3.11/site-packages/requests/models.py", line 816, in generate
    yield from self.raw.stream(chunk_size, decode_content=True)
  File "/media/software/sidefx/hfs21.0.512-gcc11.2/python/lib/python3.11/site-packages/urllib3/response.py", line 940, in stream
    data = self.read(amt=amt, decode_content=decode_content)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/software/sidefx/hfs21.0.512-gcc11.2/python/lib/python3.11/site-packages/urllib3/response.py", line 879, in read
    data = self._raw_read(amt)
           ^^^^^^^^^^^^^^^^^^^
  File "/media/software/sidefx/hfs21.0.512-gcc11.2/python/lib/python3.11/site-packages/urllib3/response.py", line 813, in _raw_read
    with self._error_catcher():
  File "/media/software/sidefx/hfs21.0.512-gcc11.2/python/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/media/software/sidefx/hfs21.0.512-gcc11.2/python/lib/python3.11/site-packages/urllib3/response.py", line 727, in _error_catcher
    raise ProtocolError(f"Connection broken: {e!r}", e) from e
urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read, 31 more expected)', IncompleteRead(0 bytes read, 31 more expected))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cache/ian.baxter/AYON/storage/dependency_packages/ayon_2602101043_linux-rocky9.zip/dependencies/pyblish/plugin.py", line 528, in __explicit_process
    runner(*args)
  File "/home/cache/ian.baxter/AYON/storage/addons/core_1.7.0-bk.1.1.0/ayon_core/plugins/publish/integrate_review.py", line 34, in process
    self._upload_reviewable(project_name, version_id, instance)
  File "/home/cache/ian.baxter/AYON/storage/addons/core_1.7.0-bk.1.1.0/ayon_core/plugins/publish/integrate_review.py", line 86, in _upload_reviewable
    self._upload_with_retries(
  File "/home/cache/ian.baxter/AYON/storage/addons/core_1.7.0-bk.1.1.0/ayon_core/plugins/publish/integrate_review.py", line 135, in _upload_with_retries
    output = ayon_con.upload_file(
             ^^^^^^^^^^^^^^^^^^^^^
  File "/home/cache/ian.baxter/AYON/AYON-1.5.3-linux-rocky9/dependencies/ayon_api/server_api.py", line 1966, in upload_file
    return self.upload_file_from_stream(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cache/ian.baxter/AYON/AYON-1.5.3-linux-rocky9/dependencies/ayon_api/server_api.py", line 1910, in upload_file_from_stream
    return self._upload_file(
           ^^^^^^^^^^^^^^^^^^
  File "/home/cache/ian.baxter/AYON/AYON-1.5.3-linux-rocky9/dependencies/ayon_api/server_api.py", line 1833, in _upload_file
    response = post_func(
               ^^^^^^^^^^
  File "/media/software/sidefx/hfs21.0.512-gcc11.2/python/lib/python3.11/site-packages/requests/sessions.py", line 637, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/software/sidefx/hfs21.0.512-gcc11.2/python/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/software/sidefx/hfs21.0.512-gcc11.2/python/lib/python3.11/site-packages/requests/sessions.py", line 747, in send
    r.content
  File "/media/software/sidefx/hfs21.0.512-gcc11.2/python/lib/python3.11/site-packages/requests/models.py", line 899, in content
    self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b""
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/software/sidefx/hfs21.0.512-gcc11.2/python/lib/python3.11/site-packages/requests/models.py", line 818, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read, 31 more expected)', IncompleteRead(0 bytes read, 31 more expected))

That’s quite odd - because I have been prepending the Houdini PYTHONPATH all this time (on Windows though) and 21.0.512 works absolutely fine to publish from and I do have the aiohttp dependency. :thinking:

I have this set:

{
    "HOUDINI_VERSION": "21.0.512",
    "PYTHONPATH": [
        "C:/Program Files/Side Effects Software/Houdini {HOUDINI_VERSION}/python311/lib/site-packages-forced",
        "C:/Program Files/Side Effects Software/Houdini {HOUDINI_VERSION}/python311/lib/site-packages",
        "{PYTHONPATH}"
    ],
    "HOUDINI_DISABLE_OPENFX_DEFAULT_PATH": "1"
}

we’re on linux and do not have the site-packages-forced folder. Do you think that makes a difference?