Troubleshooting ayon-dependencies-tool

Hello,

I made a post on the Discord server earlier where I was having the following issues.

  • Package wasn’t building, circular dependency was being reported on,
  • The built package disappeared entirely, because upload failed.

I’ve since resolved some/most of them so I’d like to share what I did.
One of the major problems was https, SSL certificates weren’t being exchanged correctly.

First, I installed pyenv for windows (Stuck developing on windows for now, sorry to all Linux users)

I’ve dug through the virtual environment in Lib/site-packages/certifi/cacert.pem
copied it, renamed it to cacert.cer, and installed it to my local machine, pointed to the cacert.pem one in the .env file as AYON_CA_CERT.

I had a wrong base dependency package set up too. Setting this to a more recent build solved the toml issues. This is one problem I am not sure about

After that I was free to add my run time dependency.

[tool.poetry.dependencies]
python = "^3.9"

[ayon.runtimeDependencies]
package = "^1.2.3"

It still crashed upon upload, but the upload seemed to go well regardless.
This is the log it generated:

Updating in dev_bundle_sas with ayon_2503191439_windows.zip
>>> Cleaning up processing directory C:\Users\sas\AppData\Local\Temp\ayon_dep-packageqr6mh38u
Traceback (most recent call last):
  File "C:\Users\sas\Documents\AYON\ayon-dependencies-tool\.venv\lib\site-packages\ayon_api\server_api.py", line 194, in raise_for_status
    self._response.raise_for_status()
  File "C:\Users\sas\Documents\AYON\ayon-dependencies-tool\.venv\lib\site-packages\requests\models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://ayon.domain.tld/api/bundles/dev_bundle_sas

This error essentially was triggered a couple times down the line.

To fix it, I had to run the start.ps1 file with both --skip-upload and --output-dir <directory>

After this I was able to upload it through the frontend and use it succesfully in the launcher.

We’re hosting the frontend in a docker container, where for now we have to expose both the https site and the “regular” http one as well. Using the http version is less preferable so I hope to see full https support in due time!

Let me know if theres some stuff I’m still overlooking, especially in the certifi department.

Sas

I can’t edit my own post for some reason.

Today I was getting a dreaded error upon any build:

After the first round of Poetry collecting stuff,
I got:

Runtime Error

“Unable to create package with no name”

The fix for this turned out to be updating pkginfo.
https://pypi.org/project/pkginfo/

(as of writing the latest version is 1.12.1.2)
I went to the directory of the dependency tool,
and ran:
$/ayon-dependencies-tool> ./.venv/Scripts/pip install pkginfo==1.12.1.2
Basically, updating the local virtual env to use the latest pkginfo.

I’ll see if I make an issue on this on the github.

EDIT: I did

I hope that anyone found this useful,

Sas

Could you try again?
Sorry for any inconvenince.

1 Like

Hi! Seems like I can edit the OG again, thanks.