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

Failsafe for cross project containers. #1806

Merged
merged 1 commit into from
Jul 21, 2021

Conversation

iLLiCiTiT
Copy link
Member

Issue

If a container from another project is in the script, the check_inventory_versions method errors. This method is run when saving the script which prevents the user from saving the work.
Reduced the error to a log warning about which nodes are the issue.

Error:

Traceback (most recent call last):
  File "C:/Program Files/Nuke11.0v4/plugins\nuke\callbacks.py", line 92, in onScriptSave
    _doCallbacks(onScriptSaves)
  File "C:/Program Files/Nuke11.0v4/plugins\nuke\callbacks.py", line 46, in _doCallbacks
    f[0](*f[1],**f[2])
  File "C:\Users\tokejepsen\bumpybox_development\pype-setup\repos\pype\pype\hosts\nuke\lib.py", line 68, in check_inventory_versions
    "_id": representation["parent"]
TypeError: 'NoneType' object has no attribute '__getitem__'

Changes

  • check_inventory_versions skip representations that were not found in database
OpenPype 2 PRs
OpenPype #1558

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 8, in 
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/cli.py", line 18, in main
    app.run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 393, in run
    self._run(argv)
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 381, in _run
    self.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/main/application.py", line 300, in run_checks
    self.file_checker_manager.run()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 331, in run
    self.run_serial()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 315, in run_serial
    checker.run_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 598, in run_checks
    self.run_ast_checks()
  File "/usr/local/lib/python3.8/dist-packages/flake8/checker.py", line 502, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 56, in run
    parser.visit(self.tree)
  File "/usr/lib/python3.8/ast.py", line 363, in visit
    return visitor(node)
  File "/usr/lib/python3.8/ast.py", line 371, in generic_visit
    self.visit(item)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 39, in visit_ClassDef
    self.capture_issues_visitor('ClassDef', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 33, in capture_issues_visitor
    self.generic_visit(node)
  File "/usr/lib/python3.8/ast.py", line 373, in generic_visit
    self.visit(value)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 36, in visit_Call
    self.capture_issues_visitor('Call', node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checker.py", line 30, in capture_issues_visitor
    issues = checker.run(node)
  File "/usr/local/lib/python3.8/dist-packages/flake8_django/checkers/render.py", line 22, in run
    if isinstance(arg, ast.Call) and arg.func.id == 'locals':
AttributeError: 'Attribute' object has no attribute 'id'

@iLLiCiTiT iLLiCiTiT self-assigned this Jul 8, 2021
@iLLiCiTiT iLLiCiTiT added type: bug Something isn't working host: Nuke labels Jul 8, 2021
@iLLiCiTiT iLLiCiTiT merged commit cb3aad9 into develop Jul 21, 2021
@mkolar mkolar deleted the bugfix/3-x_nuke_cross_project_containers branch August 10, 2021 15:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
host: Nuke type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants