Closed jschwe closed 2 years ago
Same thing here
I try bellow code, it works.
from lcov_cobertura import lcov_cobertura
lcov_cobertura. LcovCobertura
If I install lcov_cobertura==1.6
it does work fine like that, otherwise it doesn't @sonofsky2010
After having the issue, I have investigated what is going on.
The issue comes the use of setup.cfg
- before using this file, setup.py
was looking like that: https://github.com/eriwen/lcov-to-cobertura-xml/blob/1.6/setup.py ... particularly there were these two lines in setup.py
:
sys.path.append('lcov_cobertura')
import lcov_cobertura
setup.py
was actually creating a package using the file lcov_cobertura.py
and not the 'module' lcov_cobertura
(a __init__.py
is actually missing to be a module).
Three ways to fix this issue:
from lcov_cobertura import lcov_cobertura
by from lcov_cobertura.lcov_cobertura import LcovCobertura
in the documentationlcov_cobertura.py
into __init__.py
sys.path.append('lcov_cobertura')
and import lcov_cobertura
into setup.py
.Project has been already some months without any update to the repo so I it might be a bit discontinued
Fixed by 3aebf295feadd48a0415041b69d698fa77a03cc5 and released in version 2.0.2 https://pypi.org/project/lcov-cobertura/2.0.2/
Hi,
With the new version 2 release I am getting the following ImportError:
I'm using python3.9. After downgrading back to version 1.6 the import works again. Any changes I should be aware of? The Readme still recommends to use
from lcov_cobertura import LcovCobertura
, is this wrong now?