python-3.xsqlitedata-bindingponyorm

ModuleNotFoundError: No module named 'pony.orm.dbproviders'


I got this err when I converted the program to .exe when it was .py, there was no problem.

   db.bind(provider='sqlite',
           filename=(r'D:\pythons\trainers-salaries-calculator' 
                     r'\trainers_salaries_calculator.sqlite'),
                     create_db=True)

Solution

  • If you using pyinstaller, add attribute --hidden-import pony.orm.dbproviders, when compiling, like so: pyinstaller --hidden-import pony.orm.dbproviders your_script_path.py