Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Maya collect render fails when no render products are generated #3113

Open
antirotor opened this issue Apr 28, 2022 · 3 comments
Open

Maya collect render fails when no render products are generated #3113

antirotor opened this issue Apr 28, 2022 · 3 comments
Labels
host: Maya type: bug Something isn't working

Comments

@antirotor
Copy link
Member

antirotor commented Apr 28, 2022

Bug

collect_render collector plugin in Maya will fail very ungracefully when conditions are so no render products are generated - for example frame range is set so, and so on. It should check if they are generated and if not then fail with specific error message. Currently the traceback doesn't say anything useful as it crashes on completely unrelated part of code.

[cuID:OP-3145]

@antirotor antirotor added type: enhancement Enhancements to existing functionality host: Maya type: bug Something isn't working and removed type: enhancement Enhancements to existing functionality labels Apr 28, 2022
@BigRoy
Copy link
Collaborator

BigRoy commented Apr 28, 2022

Could you post the traceback/error that is seemingly unrelated?

Are you seeing this No render cameras found.? Did you test with this fix implemented?

@BigRoy
Copy link
Collaborator

BigRoy commented Apr 28, 2022

Or did you get this error:

Message:
expected str, bytes or os.PathLike object, not NoneType

Traceback (most recent call last):
  File "S:\openpype\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process
    runner(*args)
  File "S:\openpype\OpenPype\openpype\hosts\maya\plugins\publish\collect_render.py", line 279, in process
  File "C:/Program Files/Autodesk/Maya2022\Python37\lib\ntpath.py", line 452, in normpath
    path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType

To reproduce
I'm getting that when setting end frame to 1000 and start frame too 1001 (so start frame is lower than end frame, and thus NO frames are rendered).

@antirotor
Copy link
Member Author

antirotor commented Apr 28, 2022

it fails sometimes before but the reason is probably the same:

Traceback (most recent call last):
  File "C:\Program Files (x86)\OpenPype\dependencies\pyblish\plugin.py", line 522, in __explicit_process
    runner(*args)
  File "C:\Users\foo\AppData\Local\pypeclub\openpype\openpype-v3.9.5\openpype\hosts\maya\plugins\publish\collect_render.py", line 276, in process
  File "C:\Program Files\Autodesk\Maya2020\bin\python27.zip\ntpath.py", line 419, in normpath
    if path.startswith(('\\\\.\\', '\\\\?\\')):
AttributeError: 'NoneType' object has no attribute 'startswith'

Its because publish_meta_path never gets filled so calling os.path.normpath() on None will fail.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
host: Maya type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants