Skip to content

converturl2abspath does not work in Windows and the temporary workaround #16

@yishilin14

Description

@yishilin14

The bat files do not work in Windows as indicated in #13.

The python itself does not work too. The function converturl2abspath does not return the correct file name in Windows. When url is file:///C:/Users/xxxxxx/xxxxxx.pdf, it returns C:/C:/Users/xxxxxx/xxxxxx.pdf.


Here goes my temporary fix, just in case some one need it in the future.

In menextract2pdf.py

  1. Add import urllib, urllib.request at the beginning.
  2. In converturl2abspath, change the return line to return urllib.request.url2pathname(pth).

Then run the following command.

python menextract2pdf.py "C:\Users\xxxxx\AppData\Local\Mendeley Ltd.\Mendeley Desktop\username@email.com@www.mendeley.com.sqlite" "C:\Users\xxxxx\AppData\Local\Mendeley Ltd.\Mendeley Desktop\Downloaded_new"

Now it works like magic!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions