SimonBiggs / scriptedforms

Quickly create live-update GUIs for Python packages using Markdown and simple HTML elements.
Apache License 2.0
508 stars 34 forks source link

Example error on batch file #186

Closed robmarkcole closed 6 years ago

robmarkcole commented 6 years ago

Following your instructions I am able to run start example from anywhere, but when I place in a batch file I get the following error:

image

SimonBiggs commented 6 years ago

I didn't properly read your question, sorry about that. I missed the fact that it worked everywhere except within a bat file. Therefore ignore the following:

did you run pip install -e .? Also, can you print out the contents of your Windows path (echo %path%)?

SimonBiggs commented 6 years ago

Can you download the most recent repo (after commit https://github.com/SimonBiggs/scriptedforms/commit/b7540b8bdb0c193a049d2572a67be744ce5ff4f0). I have made it so that the example should still work even if the path isn't properly set when running from within the bat script (which appears to be the issue in your case).

There is an extra file within the example package __main__.py, and the command is now instead start python -m example. That way python is used to find the package and the Windows path is not relied upon.

robmarkcole commented 6 years ago

OK the updated version runs fine from the command line but from the .bat I get:

image

I have had problems with python not being on my office PC PATH before and have numerous issues with admin rights so my office PC might be a special case. I will try on a lab PC where I have full admin rights.

SimonBiggs commented 6 years ago

Yeah if it can't find python that's sort of beyond my help :).

SimonBiggs commented 6 years ago

Okay for me to close this issue?

SimonBiggs commented 6 years ago

By the way, try the portable version on this computer and let me know how it goes.