-
Notifications
You must be signed in to change notification settings - Fork 31
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
TypeError: pdf_job is undefined #545
Comments
It looks like the export has failed in some way and that this isn't being handled by figure app very well. In the first case, where The 2nd error comes after it is "finished" but there's no results. I wonder if you could check the 'Activities' panel in webclient (where you normally see script results). The figure export should show up here as it's added to the same list of activities. This view might do a better job of handling the script results and hopefully allow you to see any stderr and stdout. But it looks like OMERO.figure should do a better job here and not fail if there's no job or results. |
There is no relevant log on the server side, just some info like this:
While checking the logs, I just realized that when you click on the 'Export PDF' button a second time after the first export, the JS still use the old JobID: the log on the server give me a new processcallback while on the client side, the JobID has not changed and is still the same as the first export even if I make some changes to the figure. Hope this helps... |
Hi, Thanks for your answers.
Yes, this error always occur at the end of the export.
The figure export is failing ONYL if the second error appears. Otherwise, the PDF is readable and downloadable. By failing, I mean not downloadable.
I've checked it ; there is no stderr neither stdout in the logs (only
This may explain the second error. Rémy. |
"The first error always occur at the end of the export" but "the figure export is failing ONLY if the second error appears". So that means that when you see the first error Can you try to inspect where in the code that error is coming from, because I can't understand how the PDF download button is enabled etc if the
You're checking the JobID in the JS with the browser debugger? It might also be useful to inspect the Activities JSON data that is loaded repeatedly while the script is running and a final time when it is finished. |
Yes, line 3926 where the pdf_job is defined
The JobId returned by server is not the same between 2 exports. Here is an example
Activities during the process: Last call: |
Yes, and I don't really know how this is possible.
Exact I also noticed that it may also be due to the python environment. Those errors are not happening with python 3.6 whereas they first occur when we update the server with python 3.8, to be able to install the omero.web 5.24.0. |
I wonder if this is related to #523 - You could have a different Pillow version with python 3.8 and this would cause the script to fail if it doesn't include that fix and the figure has labels (since it fails on handling fonts). That still wouldn't explain why the script error isn't being shown in figure. In the screenshot of the Activities above there is a (i) icon indicating stdout (but no (!) icon for stderr). Do either of the errors depend on the contents of the figure being exported. E.g. if you create a new figure with just a single image panel (no labels), do you see the first error? |
We have Pillow 10.2.0 installed.
Unfortunately yes, the error still happens
No, only the first one. What I found very weird is that I'm not able to reproduce this second error. We've configure our test server with the same configs for which it happened. I'm wondering if this second error could be due to the cache of the previous version that was not clean correctly right after the update (client side) and, somehow, introduces a mess. |
OK, let's focus on the first error... When an export script is launched we POST the details and we get back a response that contains the
Then we keep fetching the Activities JSON, and this should include a response where the In this case @gaelrayot-epfl did you see that error in the first case above? Starting from a new figure:
|
In recent figure testing, I saw a similar error and have opened a bug-fix PR at ome/omero-web#541 |
The fix for this is included in omero-web 5.25.0. |
Nice, thank you very much ! |
Hello @will-moore,
I've noticed an error when exporting the PDF of the figure.
Sometimes, it is followed by a second error
and this second error stops the code before creating the download button. Thus, the figure cannot be downloaded, and it is not attached to any images.
This first error is reproducible by just exporting the Figure as PDF ; I couldn't find a way to reproduce the second one. It first happend when I tried to export a figure which already exist on the database.
Rémy
ping @gaelrayot-epfl
The text was updated successfully, but these errors were encountered: