Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyblish lite does not catch exceptions as well as QML #122

Open
hannesdelbeke opened this issue Feb 4, 2022 · 8 comments
Open

pyblish lite does not catch exceptions as well as QML #122

hannesdelbeke opened this issue Feb 4, 2022 · 8 comments

Comments

@hannesdelbeke
Copy link
Contributor

left QML, right lite
left QML, right lite

recently switched to lite, and noticed that exceptions in a collector mess with the UI.

expected behaviour:
if a collector fails due to an exception, a red box shows in the UI
just like how QML handles it

current behaviour:
lite hides the collector plugin and it's unclear what is going on

@mottosso
Copy link
Member

mottosso commented Feb 4, 2022

Does #109 implement a solution to this? Merging that seems like the best next step overall.

@hannesdelbeke
Copy link
Contributor Author

hannesdelbeke commented Feb 4, 2022

no, pype GUI has the same issue
image

@hannesdelbeke
Copy link
Contributor Author

surprising this is controlled by the GUI.
expected pyblish base to handle plugin states and GUI just read from that.
and the registered test to control when it fails/stops processing

@mottosso
Copy link
Member

mottosso commented Feb 4, 2022

surprising this is controlled by the GUI.

Surprising that a visual property is controlled by a GUI? 🤔 If I remember correctly, collectors was initially invisible always, and considered an implementation detail. Nothing a user would be in a position to do anything with, since the validators are what matters. I think they were unhidden later on in QML due to it not really being a problem having all of it visible even though you were unable to take action about it.

@hannesdelbeke
Copy link
Contributor Author

hannesdelbeke commented Feb 4, 2022

is it justs a visual bug? if so then it makes sense

before this happened, i believed all states were controlled in pyblish base.
so if pyblish fails on a controller, the state of that plugin is set to failed.
but pyblish still has a list of all plugins, and knows where it stopped.
then the UI, or a command asks for the state of the plugins, and we get the results.

including all try excepts
which catch all errors and handle them the pyblish way. putting them in the correct log, appending them to the affected plugins, instances etc

but it seems some of this work is done by the GUI. which means more places to update code.
at first it seemed QML and lite were just a "skin" but work the same under the hood

@hannesdelbeke
Copy link
Contributor Author

hannesdelbeke commented Feb 4, 2022

surprising this is controlled by the GUI. expected pyblish base to handle plugin states and GUI just read from that. and the registered test to control when it fails/stops processing

rereading this I realize I come over quite critical sometime 😓
it's because I'm so passionate about Pyblish 😄

@hannesdelbeke
Copy link
Contributor Author

tried going through the flow in lite but i can't figure out where the code decides to hide a plugin in the window when it failed.
figuring out how the model / view / control are hooked up ended up in a lot of frustration today

the only thing i did found is, it seems it is a UI bug. the whole flow continues, and the exception doesnt stop the whole process.
it just hides the plugins and processes the next ones.

any pointers on where to look for a fix?

@mottosso
Copy link
Member

mottosso commented Feb 5, 2022

is it justs a visual bug? if so then it makes sense

The original motivation for collectors was to have a bunch of them always active, no matter the project or environment you were in. The asset you were working with would then decide which collector recognised it and picked it up. At that point, having tons of unrelated collectors appear in the UI wasn't ideal.

As time progressed however it became clear that collectors took time and it wasn't feasible to wait for those that are obviously not related; so today's standard practice is to only register those that relate to what you want to publish.

The Lite GUI just hasn't been as frequently updated as QML; which was partly the point. QML was the main UI, with Lite being a "lightweight" option for those unable to physically run QML. Due to it being more complex to run, due to it using QML and in some cases Python 3 (back when Python 2 was still very much the only option in VFX).

any pointers on where to look for a fix?

I did have a quick look just now, but also wasn't able to track this down. It was too long ago to remember how I actually did this.. :( But, things to keep an eye on is the ProxyModel, maybe take that out of the equation to see if that matters. It's responsible for showing and hiding things in the model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants