Script Report not creating Boilerplate in correct directory

Hi all,

I’ve been having issues with script report where it creates the file in the site-packages folder instead of the apps folder

I also made sure that developer_mode is on as below

Anyone have any idea on what possible could’ve gone wrong

Frappe Framework: v14.99.17 (version-14-main)

ERPNext: v14.92.11 (version-14-main)

Okay. Investigated this further and it seems like the issue is on how the apps are installed as python packages. Generally when an app is installed it creates a .pth file on the site-packages which points to the frappe-bench/apps folder but for some reason this is not being done. What it is doing is that it creates the current copy of your app in the frappe-bench folder to the site-packages. In the picture below i have an app called time_tracker where this issue is happening. You can tell this if there are two directories of your app in the /env/lib/python/site-packages

image

I fixed it by deleting the time_tracker directory and leaving the time_tracker-0.0.2.dist-info then creating a time_tracker.pth file . Which has a content of the absolute path of the application inside the frappe-bench/apps folder

Another fix which is actually easier is just create your own pyproject.toml and make sure you have the section for the build-system