reffix
reffix copied to clipboard
Relative import problem
The current Git main version triggers the following error in my setup:
Traceback (most recent call last):
File "/mnt/c/Users/Ondra/Werke/reffix/reffix/./reffix.py", line 28, in <module>
from . import utils as ut
ImportError: attempted relative import with no known parent package
This is what fixes it for me:
--- a/reffix/reffix.py
+++ b/reffix/reffix.py
@@ -25,7 +25,7 @@ import bibtexparser
import re
import pprint
-from . import utils as ut
+import utils as ut
from bibtexparser.bparser import BibTexParser
import bibtexparser.customization as bc
Not sure if I'm doing something wrong?
@tuetschek How did you install the package? With both the commands mentioned in README:
pip install -e .[dev]
which installs the local project, and:
pip install -U reffix
which installs the PyPI version, running e.g. reffix ./tests/test.bib works for me.