marzer / poxy

Documentation generator for C++
https://pypi.org/project/poxy
MIT License
135 stars 5 forks source link

m.css uses the wrong path for python #19

Closed wroyca closed 1 year ago

wroyca commented 1 year ago
Post-processing XML files
Compiling regexes
Generating HTML files with m.css
m.css failed!
m.css stderr:
    Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

Nothing like our beloved Microsoft to break things, right? why, oh, why is Microsoft trying to shove the Microsoft Store version of Python down our throats? anyway :

*************

Traceback (most recent call last):
  File "C:\Users\wroy\AppData\Local\Programs\Python\Python311\Lib\site-packages\poxy\main.py", line 327, in main
    run(
  File "C:\Users\wroy\AppData\Local\Programs\Python\Python311\Lib\site-packages\poxy\run.py", line 1644, in run
    run_mcss(context)
  File "C:\Users\wroy\AppData\Local\Programs\Python\Python311\Lib\site-packages\poxy\run.py", line 1546, in run_mcss
    run_python_script(
  File "C:\Users\wroy\AppData\Local\Programs\Python\Python311\Lib\site-packages\misk\functions.py", line 331, in run_python_script
    return subprocess.run(
           ^^^^^^^^^^^^^^^
  File "C:\Users\wroy\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 569, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['py', 'C:\\Users\\wroy\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\poxy\\data\\m.css\\documentation\\doxygen.py', 'C:\\Users\\wroy\\AppData\\Local\\Temp\\poxy\\C_Users_wroy_Desktop_echo_docs\\conf.py', '--no-doxygen', '--sort-globbed-files']' returned non-zero exit status 9009.

*************

poxy_bug_report.zip

wroyca commented 1 year ago

Additional note:

where python
C:\Users\wroy\AppData\Local\Programs\Python\Python311\python.exe
C:\Users\wroy\AppData\Local\Microsoft\WindowsApps\python.exe

*I never installed the Microsoft Store version

marzer commented 1 year ago

Yeah, this is a dumb windows thing. It's not that poxy is using the wrong path (py is generally the correct python launcher on windows), but that windows started hijacking it. I can probably add in some additional logic to try to find python.exe etc but also you can just do as that error message says and disable the shortcut behaviour

wroyca commented 1 year ago

Yeah, this is a dumb windows thing. It's not that poxy is using the wrong path (py is generally the correct python launcher on windows), but that windows started hijacking it. I can probably add in some additional logic to try to find python3.exe etc but also you can just do as that error message says and disable the shortcut behaviour

Indeed, this fixes the problem, ridiculous to have to do this but Windows will be Windows 😅

marzer commented 1 year ago

Yep. I think that is the best solution for this. PEP 397 gives a good overview of why py on windows is the preferred entry-point and any hoop-jumping I do will end up side-stepping it.