Jump to content

Problems with isbntools (pip package)


Recommended Posts

Hi,

 

Im trying to get a set of isbn-lookup tools (isbntools) from a python/pip package to work inside an Alfred workflow. Ive installed the package locally (inside the workflow folder), and the gist of it is working. Specifically, im able to use alfred to fuzzy search for a book, and get the ISBN number to my clipboard (and past it inside Zotero). 

 

But theres a sub-script (isbn_meta) that works the other way around: look up the metadata for a particular ISBN number. It works in my terminal, but im not able to get it to work inside Alfred. The debugger shows that the output of the command (isbn_meta) is not outputting anything; which really doesn't help me figure out whats wrong.

 

I presume it either has to do with the python script not working (which ideally should have printed some sort of error message), or maybe Alfred is not able to pass the output of the command properly.

 

Any ideas on how to fix/troubleshoot this is very welcome. Im not well versed in scripting, so forgive me if theres an obvious answer here.

 

image.thumb.png.4c01341cdae8cb1ffb820c2c603e7593.png

Link to comment

When asking for help with a Workflow, please upload it somewhere as we can’t properly help you without access to it. Debugging can already be hard with access to the code, and you’re only providing a description and screenshots. There are multiple places where your code or Workflow setup may be going wrong. Without looking at it we’re shooting in the dark.


See the Reporting Problems with Workflows topic for an overview on building effective reports.

Link to comment
20 hours ago, vitor said:

When asking for help with a Workflow, please upload it somewhere as we can’t properly help you without access to it. Debugging can already be hard with access to the code, and you’re only providing a description and screenshots. There are multiple places where your code or Workflow setup may be going wrong. Without looking at it we’re shooting in the dark.


See the Reporting Problems with Workflows topic for an overview on building effective reports.

 

Sorry. Makes sense.

 

But the reason I didn't do it was because my question is more about python-debugging, than actually getting the workflow to work. And because to get the workflow to work, you need

pip install --target . isbntools

and I don't expect you guys to do that. So im kinda lost on what to do. Im way above my paygrade here, so its also hard to explain what my problem is. 

 

The screenshot is actually the whole workflow, though. Apart from the query from the keyword-input that goes into it. It seems to me that the problem is with Alfred not being able to execute the Python script (isbn_meta) properly. Its just that the debugger is not outputting enough information, so I don't know what goes wrong. Other scripts that come with isbntools are working.

Heres a link to the workflow. The isbntools-package is installed in the workflow directory, but Im not sure if it is exported with the workflow? https://www.dropbox.com/s/3ike588dh6ahjte/isbntools meta.alfredworkflow?dl=0

Edited by defmc
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...