Getting module not callable when trying to run package installed from setup.py

457 Views Asked by At

I have this whole case on GitHub https://github.com/jiri-otoupal/dievpn.

It normally works, when I just run it through main.py But if i install it with python setup.py install and try to run dvpn

It throws exception

Traceback (most recent call last):
  File "P:\Projects\dvpn\venv\Scripts\dvpn-script.py", line 33, in <module>
    sys.exit(load_entry_point('dvpn==0.5.3', 'console_scripts', 'dvpn')())
TypeError: 'module' object is not callable

I had looked at it closely but can not find the issue.

1

There are 1 best solutions below

0
On

It is problem with if __name__ == "__main__" not executing as an entrypoint, function to entrypoint needed to be passed in setup.py with module=module.submod:func.