How to import custom modules in auto-py-to-exe

Here is my file structure


When I include the path of the module in auto-py-to-exe and create the exe file, after running it I have the error “arp_module not found”. When I run the script without creating the exe file, it runs as expected. Here is the code in my start file

import subprocess
import os
import sys

def resource_path(relative_path):
    """ Get absolute path to resource, works for dev and for PyInstaller """
        base_path = sys._MEIPASS
    except Exception:
        base_path = os.path.abspath("../../")
    return os.path.join(base_path, relative_path)

def modules_path(relative_path):
    """ Get absolute path to resource """
        base_path = sys._MEIPASS
    except Exception:
        base_path = os.path.abspath(".")
    return os.path.join(base_path, relative_path)

def run_main_module():
    venv = 'ARWriter/env'
    module_path = "arp_module.main"
    python_interpreter = os.path.join(resource_path(venv), "Scripts", "python.exe")
    if not os.path.isfile(python_interpreter):
        print("Python interpreter not found")

    try:[python_interpreter, '-m', module_path], check=True)
    except subprocess.CalledProcessError as e:
        print(f"Error running the module: {e}")

if __name__ == "__main__":

Please where is the error coming from and how can I fix it.