MicheleCotrufo/pdf2doi

Running this on Mac Big Sur in VSC, v 0.5 returns this error. v 0.4 does not.

Pathos315 opened this issue · 2 comments

Traceback (most recent call last):
File "/Users/johnfallot/venv/210706_PDN_ScienceAssistant_v16.py", line 3, in
from pdf2doi.finders import validate
File "/usr/local/lib/python3.9/site-packages/pdf2doi/init.py", line 13, in
from .main import pdf2doi
File "/usr/local/lib/python3.9/site-packages/pdf2doi/main.py", line 6, in
import pdf2doi.utils_registry as utils_registry
File "/usr/local/lib/python3.9/site-packages/pdf2doi/utils_registry.py", line 5, in
import winreg
ModuleNotFoundError: No module named 'winreg'

Thank you for posting this.
This is due to the fact that pdf2doi tries to include the module winreg which exists only in Windows. This module is only needed for "advanced" functionalities (e.g. being able to call pdf2doi by just right-clicking on a pdf file), but it gets mistakenly loaded at very beginning of one of the main modules. I will fix this in the next version which will be released in a few days.

This was solved in version 0.6.