Closed fabswt closed 8 years ago
The issue, strangely, is actually that there are quotes added, not that there aren't (there are two sets of quotes, which for whatever reason causes open() to look for a path starting with the drive "C. I'll add something to strip quotation marks.
I have pushed version 0.9.2 which fixes this issue for me. Please let me know if it doesn't work for you.
Hello, Thanks for the feedback.
0.9.2 doesn't work for me, not even with files that do not contain any whitespaces in them:
Input File: C:\Users\Fabien\Desktop\hetedik.txt
Title: The Seventh
Tags (optional): TheSeventh
Traceback (most recent call last):
File "C:\Program Files (x86)\Anki\AnkiLPCG\lpcg.py", line 173, in
Hope it helps.
Well, perhaps Windows handles it differently than Linux does then. Could you try editing the (0.9.2) file and replacing the quotation_strip function with this?
def quotation_strip(string):
string = "\"%s\"" % string
What happens then, with both no-spaced and spaced paths?
This situation is irrelevant in 1.0., so whatever it was, it should be okay now. :-)
Hello,
Using AnkiLPCG with Python 2.7. I can drag and drop the input file, specify the title and tags, however I would then end up with the following error:
I've fixed it by removing whitespaces from the input file's name and by moving it to a different directory.
I would suggest either automatically adding double-quotes around the path or putting a warning about paths inside of the readme.
I hope it helps somewhat.
By the way, thanks for the script, I've started playing with some poems I want to commit to memory and this is great stuff!
Fabien