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

Error running script #3

Closed
LCaseiro opened this issue May 1, 2020 · 3 comments
Closed

Error running script #3

LCaseiro opened this issue May 1, 2020 · 3 comments

Comments

@LCaseiro
Copy link

LCaseiro commented May 1, 2020

Hello,

This script is exactly what I need, so I was happy to find it. However, I have been trying to run it without success... I am trying to run it in windows 10, with python 3.8.
When I try to run the script, I always get the following error:

C:\Users\###\citations> python analyze_papers.py zotero_file.csv
Traceback (most recent call last):
  File "analyze_papers.py", line 199, in <module>
    titles_dict = read_titles(args.zotero_csv)
  File "analyze_papers.py", line 78, in read_titles
    for r in reader:
_csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)

I am sorry if this is because of some error on my part, but I can't find the problem and I was really hoping to use your script. I hope you can help.

Thanks a lot!

@badarudduja
Copy link

I've run into the same problem. I think the python code only works for Python 2.7.
I am trying to run it by 'python2 analyze_papers.py zotero_file.csv' on shell, but its missing the pdfminer library.
Can't figure out how to install the pdfminer library specifically for python2.

@jaks6
Copy link
Owner

jaks6 commented May 20, 2020

Hello, thanks for opening the issue.

The code was indeed not working properly in Python 3. I have made changes to now fully adapt to Python3, so the issue should be resolved for you @LCaseiro

@badarudduja to install the pdfminer library ( https://pypi.org/project/pdfminer/ ) try using pip.
If you are using PyCharm, it can give you some automatic fix suggestions to install the library if you open the file where pdfminer is imported (layout_scanner.py)

@badarudduja
Copy link

Thanks @jaks6! This is really helpful.

@jaks6 jaks6 closed this as completed Jun 3, 2020
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