I have encoded my program so I can sell it to customers.
Also I want to convert it to exe with the tool auto-py-to-exe so the customers won't have to install python.
When I launch the encoded program from Visual Studio Code all works as intended.
But when I convert it to exe it returns an error message:

Traceback (most recent call last):
File "test.py", line 8, in 
File "", line 2, in 
ModuleNotFoundError: No module named 'selenium'
[11189] Failed to execute script test
logout

When I do not encode my program I can convert it without any issues.
Any idea what I might be missing here?
Solution was, to add the "import" lines for all my modules on the top level of the .py
Working now.
Python Base64 Selenium module missing when converting to exe