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

UnboundedLocalError: local variable 'folder' referenced before assignment #34

Open
bholtdwyer opened this issue Feb 18, 2021 · 0 comments

Comments

@bholtdwyer
Copy link

Here's what happens when I try to run menotexport:

First, I have to manually install pdfminer.six and bs4

Then, when I run it:

`(menotexport) Cu-Chulainn:Menotexport-master holtdwyer$ python menotexport.py -pmnrz ~/Documents/mendeley_backups/backupSlot4/holtdwyer@[email protected] ~/Documents/menotexport_attempt
/Users/holtdwyer/opt/anaconda3/envs/menotexport/lib/python2.7/site-packages/pdfminer/init.py:20: UserWarning: On January 1st, 2020, pdfminer.six will stop supporting Python 2. Please upgrade to Python 3. For more information see pdfminer/pdfminer.six#194
warnings.warn('On January 1st, 2020, pdfminer.six will stop supporting Python 2. Please upgrade to Python 3. For '

======================================================================

: Connected to database:

 /Users/holtdwyer/Documents/mendeley_backups/backupSlot4/holtdwyer
@[email protected]

================================ 1/38 ================================

: Processing folder: "basic_to_read"

------------------------------------------------------------------
# <Menotexport>: No annotations found in folder: basic_to_read

------------------------------------------------------------------
# <Menotexport>: Exporting un-annotated PDFs ...

------------------------------------------------------------------
# <Menotexport>: Exporting meta-data and annotations to .ris
file...

Traceback (most recent call last):
File "menotexport.py", line 1672, in
args.separate,args.zotero,args.verbose)
File "menotexport.py", line 1495, in main
separate,iszotero,verbose)
File "menotexport.py", line 1276, in processDocs
risfolder,allfolders,isfile,iszotero,iskeyword,verbose)
File "/Users/holtdwyer/Downloads/Menotexport-master/lib/export2ris.py", line 298, in exportDoc2Ris
risdata=parseMeta(docii,basedir,folder,isfile,iszotero,iskeyword)
UnboundLocalError: local variable 'folder' referenced before assignment`

In short, it seems to break on the first folder due to a variable declaration issue.

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

1 participant