TACTIC Open Source
Publish errors - Printable Version

+- TACTIC Open Source (http://forum.southpawtech.com)
+-- Forum: TACTIC Open Source (http://forum.southpawtech.com/forumdisplay.php?fid=3)
+--- Forum: TACTIC Discussion (http://forum.southpawtech.com/forumdisplay.php?fid=4)
+--- Thread: Publish errors (/showthread.php?tid=200)



Publish errors - Bassment - 02-01-2021

Hey all, we're suddenly getting a bunch of errors on publishing files. Just started this morning.

First is happening to only a few shots here and there. Not all are affected and it seems random.

Check-in failed: local variable 'searchkey' referenced before assignment

Then this pops up when opening the checkin widget. Again, randomly. Sometimes it opens and sometimes this error pops up.

Reported Error: "'DivWdg' object has no attribute 'generate_api_key'"

Stack trace:
Error: 'DivWdg' object has no attribute 'generate_api_key'

  File "/home/tactic/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 5046, in get_widget
    html = widget.get_buffer_display()
  File "/home/tactic/tactic/src/pyasm/web/widget.py", line 459, in get_buffer_display
    buffer = my.get_buffer(cls)
  File "/home/tactic/tactic/src/pyasm/web/widget.py", line 450, in get_buffer
    my.explicit_display(cls)
  File "/home/tactic/tactic/src/pyasm/web/widget.py", line 417, in explicit_display
    widget = child.get_display()
  File "/home/tactic/tactic/src/pyasm/web/html_wdg.py", line 774, in get_display
    super(HtmlElement,my).get_display()
  File "/home/tactic/tactic/src/pyasm/web/widget.py", line 438, in get_display
    widget.explicit_display()
  File "/home/tactic/tactic/src/pyasm/web/widget.py", line 408, in explicit_display
    child = my.get_display()
  File "/home/tactic/tactic/src/tactic/ui/widget/checkin_wdg.py", line 1452, in get_display
  File "/home/tactic/tactic/src/tactic/ui/widget/checkin_wdg.py", line 2190, in get_publish_wdg


RE: Publish errors - remkonoteboom - 02-01-2021

This is a rather strange error. The first one:

"Check-in failed: local variable 'searchkey' referenced before assignment"

Has the variable "searchkey" without a _ (ie: search_key) ... I can't find an instance of that variable anywhere in the source code?
If you do a "git log", what commit is the last on (the one on the top).

The second error is also strange because DivWdg definitely does have a "generate_api_key" method and has had it for a while in 4.8. Is it possible that you have a __pycache__ compiled file from an old version of TACTIC?


RE: Publish errors - Bassment - 02-01-2021

Hmm, ok this makes me think that someone inadvertently changed search_key to searchkey.
We're still on 4.5 but checking out 4.8 and functionality so I also think that maybe someone copied something from 4.8 into 4.5 without realizing.
Long nights will do this.
I'm going to check this out and get back with the results.


RE: Publish errors - Bassment - 02-02-2021

Ok, problems resolved.
DivWdg error we think was caused by saving changes to the checkin widget from 4.8 into 4.5 due to habit.
Checkin failed error was tracked down to a trigger in the old vfx template that generates thumbnails on publish. Seems it went un noticed and nobody knew it was there until looking at the list of active triggers.
Note that this is the second time that we experienced a trigger causing the "referenced before assignment" error for anyone experiencing this. look at triggers first.
Thanks for the suggestions Remko.


RE: Publish errors - remkonoteboom - 02-02-2021

Glad to help.


RE: Publish errors - remkonoteboom - 02-02-2021

Another note on this. For trigger errors, it should appear in the "exception_log" table. I know we did a bunch of work on this in 4.7/4.8. I believe all errors should be going to the log in 4.8. This makes diagnosing the location of trigger errors such as this much easier because we can now capture the stack trace without having to put TACTIC in debug mode and trying to reproduce it. Not that the exception_log probably didn't work that great in 4.5.