path can be case sensitive in windows, resulting `No obfuscated script found` on error
OS: windows server 2022 python: 3.10 pyarmor version: 7.7.4 pyinstaller version: 5.8.0
I don't know if we should consider this a bug or just leave it here for other people experiencing this behavior to know.
When running pyarmor.exe pack in windows path is case sensitive.
I could only reproduce this from python, not from command line (I have a python script to compile my project).
C:\work>python
>>> from subprocess import check_output
>>> open("c:\work\hello.py", "rt").read()
'print("Hello World")'
>>> #------------ run with lowercase path fails
>>> check_output(r"C:\Python310\Scripts\pyarmor.exe pack hello.py", cwd=r"c:\work", shell=True)
INFO PyArmor Trial Version 7.7.4
INFO Python 3.10.10
INFO Prepare to pack obfuscated scripts with PyInstaller...
INFO entry script: hello.py
INFO src for searching scripts: .
INFO build path: dist\obf
INFO Run PyArmor to obfuscate scripts...
INFO
.....
10312 INFO: Graph cross-reference written to c:\work\build\hello-patched\xref-hello-patched.html
Traceback (most recent call last):
File "C:\Python310\lib\runpy.py", line 196, in run_module_as_main
return run_code(code, main_globals, None,
File "C:\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Python310\lib\site-packages\PyInstaller_main.py", line 198, in
For my 2 cents...
>>> open("c:\work\hello.py", "rt").read()
you shouldn't use \ regardless...
>>> open("c:/work/hello.py", "rt").read()
If you do you use r
>>> open(r"c:\work\hello.py", "rt").read()
this example is only intended to show the file content, and aren't part of my script...
Yes. Path is case sensitive even in Windows. I think this is not a big problem and didn't change it because linux and macOS are case sensitive.