why Jupyter Dash return an empty error message during callback - plotly-dash

I am using Jupyter Dash, I am trying to plot a heatmap to the graph. I got an empty error message.
so I an trying to use print() to catch where is the error.
During callback, here is the code. From the print message, I did finish the function of making figure. and error occurs when trying to return figure into graph area in callback. The graph is not updated due to the error. But why error message is empty? I am trying to figure out what is the problem?
Could it be memory issue when trying to plotting a big heatmap? any method I can try to figure out?
Thank you so much for your help.
timer_start=timeit.default_timer()
pad,key,index_contour)
(fig_padcontour,markdown_padcontour)= make_contour(df_contour)
timer_end=timeit.default_timer()
timer_minutes=(timer_end-timer_start)/60
print(f'Time took to finish plottin pad contour function is {timer_minutes:.2f}, minute')
print('Ready to Callback Updating the contour plot')
return fig_padcontour,markdown_padcontour

Related

AS3 - Catch ANY Error thrown and keep track of them?

I would like to have many devices testing a game, and I find the best way to debug a game and solve specific code problems is to have the device connected and in debug mode in Adobe ANIMATE, that way I can catch any Errors in the Output window.
For Example, if I am debugging and connected to Animate, the output window will throw errors like :
ReferenceError: Error #1065: Variable bg_storage is not defined.
at global/flash.utils::getDefinitionByName()
at Game/stageAdd()[/Users/**/Game.as:360]
Now I know exactly what the problem is and where to find it. I love errors like this.
My question :
If I didn't have a device connected to Animate in Debugging mode, is there a way to make the game detect any errors thrown and store them as a String, that way I can put up a big text block on the game of the error string and keep track.
or at least a way to log them some how?
Ex :
If an error is thrown, have that error text set as a String variable, then have a text box write out that String variable.
I hope that isn't too confusing. If I am going about debugging in a poor way, I would love to know what you guys do to keep track of errors without being connected to debug mode.
EDIT
I can see an approach is you to add an uncaughtErrorEvent event to each function to be able to catch these errors...
loadbar.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR ... )
I am trying to make it so any error thrown in any part of the game will trace that error somewhere to a String value that I can call, so that I can see any error thrown during a play test session without being connected to debug mode.
Thanks!
Sure. There's a class intended exactly for that: https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/UncaughtErrorEvent.html See examples at the bottom of the page to listen to the right instances for that event.
You are also free go grab my own class that does the thing you want: https://bitbucket.org/thydmitry/ru.delimiter/src/2756fadd741a6d44276fde1701470daf24cebfa8/classes/ru/delimiter/utils/Log.as?at=default&fileviewer=file-view-default
You will need to add it to your project and then call in the main document class (in constructor, preferably):
Log.create(this);
Log.handleExceptions(this, true);

Yii: File Upload Widget jquery.fineuploader [FineUploader] Caught exception in 'onComplete' callback - Cannot read property 'split' of null

I have an existing source code. I have function called upload resource. If i click on upload button and try to upload image file it says following error.
jquery.fineuploader-3.4.1.min.js:4 [FineUploader] Caught exception in 'onComplete' callback - Cannot read property 'split' of null
In View file, Widget is added i.e. ext.EFineUploader.EFineUploader
Anyone have any idea what could be wrong?
The message indicates that there is an error in your onComplete callback function. You haven't posted your code, so there is no way to determine exactly where the error is, but it appears as if you are attempting to split a string, but the string in your code is null for some reason. You'll need to look closer at your code to determine where the error is.

AS3, Flash: Accessing error messages text in code

I'm working on some flash app. Now, to test customer side of it I can use Flash Player debugger version that will save logs and show error messages. When it's deployed on the customer side - they will have a regular Flash Player version which means I will have no access to error messages if errors will happen. So I would like to equip it with some tool that would capture all of my trace messages in code and errors text. As for trace messages that's fairly simple, I just override the function in my code so it sends a POST request with trace message to a logger server, but how can I get a hold of the error message? Is there a known approach to this or some trick that somebody can suggest?
You can install the debug version of flash as your browser's default (in Chrome, you must disable the built-in player), so if you wanted to test user experience and debug, this would be the ideal solution.
However, to answer your question: there's no method for universally catching all errors, and redirecting them (that I know of). You'd have to encapsulate problem code ahead of time with try...catch statements, and send the property back on catch. For example:
try {
this["foo"]();
} catch (e:Error) {
trace(e);
}
In the debug version, the traced value would be TypeError: Error #1006: value is not a function. And while the standard version will only output TypeError: Error #1006, (a notably less descriptive error), what we're missing is any reference to where the error occured. To get this, we need to use Error.getStackTrace() to see the call stack and the line where the error occurred. In debug, this outputs the following:
TypeError: Error #1006: value is not a function.
at Shell_fla::MainTimeline/init()[C:\Projects\shell.as:91
In the standard client, we get a dissapointing null. In short, you cannot get any valuable info from the client versions.
The best advice I can give is to write around your problem code with your own custom error reports. For example, catch IO errors and trace the file it failed to load, or if you're expecting an object.foo, first try if (object.hasOwnProperty("foo")) { // do something } else { trace("foo not found in " + object.name) }. Code defensively.
Cheers,
I've discovered this post on StackOverflow:
How to catch all exceptions in Flex?
It answers my question, strange that I haven't ran into it while I was googling prior to asking.

GAS 'Unexpected exception upon serializing continuation' error present when run from menu, but not present when run from editor

A GAS function is triggered from a sheet custom menu. This function is executed daily and has worked without error for weeks. A couple days ago, users started to see the so unhelpful "Unexpected exception upon serializing continuation" error. I have found that I can execute the exact same function from the code editor without error, but consistently re-produce the error when using the menu. More odd, everything I expect the function (and others called by it) appears to be completing correct.
How can I trouble-shoot an error and file a problem report with google when I can't run isolate parts of the script to narrow down the problem?
Encapsulate your trigger-code inside a try-catch block:
function calledByTriggerOrMenu () {
try {
doTheThings();
}
catch (e) {
Logger.log ("Catched something: "+e+"\n"+e.stack);
}
}
Then you know exactly where the error occured

DB2 Exception handling

The problem that I am facing is primarily on Exception Handling! When an exception occurs I want to put that data in another log table with the error message. However, in DB2 I am not able to figure out a way to retrieve the corresponding error message for the raised SQLSTATE.
PS: I have a stored procedure for this migration and I am not using any other language to call it.
We could do this through SQLERRM in oracle; probably it should be a small thing, still for some strange reasons I have not been able to find it yet!
Hopefully you would have an idea on this, ;-). I just need a pointer on this.
Thanks,
Harveer Uppal
DB2 has an SQLERRM function too. All you need to to is capture all of the tokens from the error and feed them into the function for the equivalent message you'd get from the CLP.
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.sql.rtn.doc/doc/r0022027.html
You should be able to get in the front-end code using DB2Exception.Message property.