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

Getting - "There was an error in the Python parsing script." an no capture template triggered #9

Open
nausher opened this issue Jan 18, 2020 · 4 comments

Comments

@nausher
Copy link

nausher commented Jan 18, 2020

I followed the following steps to set this up -
(1) downloaded the Application and installed it in /Applications
(2) Created a ~/.orgprotocol.ini file that points to the right emacsclient
(3) created a capture template and added server start lines in my emacs .ini file
(4) Used the bookmarklet to bookmark a URL.

When running the bookmarklet i receive the following error - "There was an error in the Python parsing script.".

I checked to see if the module "six' existed and it does.
How else can I debug this issue?

@aaronbieber
Copy link
Owner

I'm sorry that you're experiencing this issue. I stopped using this setup full-time a while ago so I am not sure off the top of my head what the problem could be. This combination of bookmarklet, app with protocol binding, and Python script is notoriously difficult to troubleshoot.

@aaronbieber
Copy link
Owner

You can right click the application and open the bundle. Within it you will find the python script itself. If you are even slightly versed in python you should be able to fiddle around with running it manually on the command line.

You should also be able to open the application itself in Script Editor, which is the only way to see the osascript code. In there you can try adding debugging statements... It's quite tricky to test the actual protocol handling so I usually add code in the script to send specific strings to the subroutines.

It's been a long time since I worked on this project so my memory may be fuzzy, but those are some general steps to take.

@nausher
Copy link
Author

nausher commented Jan 24, 2020

Thanks for the tips @aaronbieber .
I ended up using an Apple Script that does something similar but without the Python dependency.
The Script is here on Github - https://github.com/sprig/org-capture-extension
You can perhaps link to this version.

Either ways, let me know and I can close the issue.

@malcolmpurvis
Copy link

I've also had the occasional parser failure error. The solution I've come up with is to replace the on error section of the Applescript with this:

	on error errText
	display alert "Error" message "There was an error in the Python parsing script: " & errText
end try

This will add the python stack trace to the alert. It's really ugly but helps to quickly identify the problem.

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

No branches or pull requests

3 participants