invoice-x / factur-x-ng

Python lib for Factur-X, the e-invoicing standard for France and Germany
Other
34 stars 8 forks source link

Has a namespace clash with other factur-x package #40

Open nyov opened 4 years ago

nyov commented 4 years ago

Trying the README example:

from facturx import FacturX

inv = FacturX('some-file.pdf')

errors spectacularly in Python3 at least:

$ python3 test.py
Traceback (most recent call last):
  File "test.py", line 1, in <module>
    from facturx import FacturX
  File "/home/testlab/.local/lib/python3.7/site-packages/facturx/__init__.py", line 3, in <module>
    from .facturx import FacturX
ImportError: cannot import name 'FacturX' from 'facturx.facturx' (/home/testlab/.local/lib/python3.7/site-packages/facturx/facturx.py)

It does say Python3 is supported, right? https://github.com/invoice-x/factur-x-ng/blob/master/setup.py#L21

nyov commented 4 years ago

Okay, this happens to be a name-clash with the other factur-x package, because the package name changed but the module dir did not, and so they were co-installable but overwrote each other.

I think this should be changed.