aws-deadline / deadline-cloud-for-cinema-4d

AWS Deadline Cloud for Cinema 4D
Apache License 2.0
8 stars 9 forks source link

fix: windows adaptor was failing to load #44

Closed epmog closed 4 months ago

epmog commented 4 months ago

Resolves https://github.com/aws-deadline/deadline-cloud-for-cinema-4d/issues/40

What was the problem/requirement? (What/Why)

There were a few problems with using C4D on windows:

  1. The adaptor runtime client was failing to find pywin32 when attempting to connect: ModuleNotFoundError: No module named 'win32file'
  2. There were some misdirection in the stack trace when failing to load pywin32. It would complain with NameError: name 'main' is not defined. Did you mean: 'min'? since we were catching the above error
  3. The adaptor was trying to load the posix interface to communicate

What was the solution? (How)

  1. Documented the requirement to install pywin32 into C4D's python environment.
  2. Removed the try/except around loading the runtime client to make it easier to debug
  3. Swapped HTTPClientInterface to the OS-agnostic ClientInterface to work on both Linux and Windows.
  4. Cut an issue to remove the pywin32 dependency from the openjd adaptor runtime to remove this rough edge. Link: https://github.com/OpenJobDescription/openjd-adaptor-runtime-for-python/issues/131

What is the impact of this change?

You can render on Windows!

How was this change tested?

hatch run fmt
hatch build
hatch run lint
hatch run test

The adaptor was also able to successfully render a job

Was this change documented?

Yup!

Is this a breaking change?

Nope!


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud