Skip to content

Can't launch .app but exec works fine #7966

Answered by rokm
donolsch asked this question in Help
Discussion options

You must be logged in to vote
import logging

logging.basicConfig(filename='error.log', level=logging.ERROR)

try:
   my code

except Exception as e:
   # Log the error
   logging.error(str(e))

You seem to be trying to write your error.login the current working directory. When you "open" an .app bundle, your current working directory is most likely not writable (I think it is / , but it could also be the temporary read-only location where the OS translocates untrusted .app bundles), so your exception handling probably raises an exception itself.

For the purposes of debugging, try to hard-code the error.log path to be an absolute path in your user's home directory, as was suggested in other similar issues (#5154 (co…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@donolsch
Comment options

Answer selected by donolsch
Comment options

You must be logged in to vote
1 reply
@balarohitnelluri
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants