Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
Franck_R
Level III

Encrypt a JMP App -> prevent JMP from displaying readable python's code in the log window in case an error occurs?

Hi

 

[Edit]

I have solved the issue myself with python error handling

 

Franck

4 REPLIES 4
Highlighted

Re: Encrypt a JMP App -> prevent JMP from displaying readable python's code in the log window in case an error occurs?

Hi Frank,

 

Would you be able to elaborate a bit on the solution?  I'd like to see it.

Highlighted
Franck_R
Level III

Re: Encrypt a JMP App -> prevent JMP from displaying readable python's code in the log window in case an error occurs?

Yes sure!

The problem was that when python's code was dealing with a problem, instead of displaying the error message JMP writes my entire code in the log window even if it was supposed to be encrypted.

To prevent that to happen I have inserted in my python's code: try/except

try:

   my code

   ...

except:

  print('python has crashed')

 

So when there is a problem in the python's code, for example an hyperparameters that was not handled (it can be for example negative values in the grid search,... because it was difficult to prevent wrong values to be include in this menu because I handle that with a string list) the python's code doesn't generate an error anymore but just a print. So JMP doesn't write the python's code uncrypted/readable in the log window

 

Highlighted

Re: Encrypt a JMP App -> prevent JMP from displaying readable python's code in the log window in case an error occurs?

Awesome! Thanks for sharing.

Highlighted
Franck_R
Level III

Re: Encrypt a JMP App -> prevent JMP from displaying readable python's code in the log window in case an error occurs?

you're welcome

 

My first intention was to look for a kind of hidden options in jsl, perhaps a way to prevent JMP to display python's code or better: to display instead python's error message which would have been much more helpful for debug but it seems that there is no such an option unfortunately...

 

Article Labels

    There are no labels assigned to this post.