Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with pyinstaller - Non-UTF-8 code starting with '\x90' #409

Closed
arruw opened this issue Sep 9, 2017 · 2 comments
Closed

Help with pyinstaller - Non-UTF-8 code starting with '\x90' #409

arruw opened this issue Sep 9, 2017 · 2 comments

Comments

@arruw
Copy link

arruw commented Sep 9, 2017

This is question.

I'm trying to bundle unoconv with pyinstaller. All I did is downloaded unoconv script and run following commands:

python --version
python unoconv --version
pyinstaller -F unoconv
.\dist\unoconv.exe --version

I have added # -*- coding: utf-8 -*- header after shebang and saved unoconv script as UTF-8. But still geting same error. How can I get this to work?

Here is complete output:

PS C:\Users\matja\Desktop> python --version
Python 2.7.13
PS C:\Users\matja\Desktop> python unoconv --version
unoconv 0.7
Written by Dag Wieers <dag@wieers.com>
Homepage at http://dag.wieers.com/home-made/unoconv/

platform nt/win32
python 3.3.5 (default, Aug 23 2017, 07:39:04) [MSC v.1800 64 bit (AMD64)]
LibreOffice 5.3.6.1
PS C:\Users\matja\Desktop> pyinstaller --version
3.2.1
PS C:\Users\matja\Desktop> pyinstaller -F unoconv
144 INFO: PyInstaller: 3.2.1
145 INFO: Python: 2.7.13
146 INFO: Platform: Windows-10-10.0.15063
153 INFO: wrote C:\Users\matja\Desktop\unoconv.spec
155 INFO: UPX is not available.
159 INFO: Extending PYTHONPATH with paths
['C:\\Users\\matja\\Desktop', 'C:\\Users\\matja\\Desktop']
159 INFO: checking Analysis
159 INFO: Building Analysis because out00-Analysis.toc is non existent
161 INFO: Initializing module dependency graph...
165 INFO: Initializing module graph hooks...
298 INFO: running Analysis out00-Analysis.toc
303 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable
  required by c:\python27\python.exe
451 INFO: Found C:\Windows\WinSxS\Manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_3da38fde
bd0e6822.manifest
455 INFO: Found C:\Windows\WinSxS\Manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9279_none_acd3d
86fe1d846c4.manifest
599 INFO: Searching for assembly amd64_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.9279_none ...
601 INFO: Found manifest C:\Windows\WinSxS\Manifests\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9279_none_08e667e
fa83ba076.manifest
605 INFO: Searching for file msvcr90.dll
605 INFO: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9279_none_08e667efa83ba076\msvc
r90.dll
605 INFO: Searching for file msvcp90.dll
606 INFO: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9279_none_08e667efa83ba076\msvc
p90.dll
606 INFO: Searching for file msvcm90.dll
606 INFO: Found file C:\Windows\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9279_none_08e667efa83ba076\msvc
m90.dll
710 INFO: Found C:\Windows\WinSxS\Manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_3da38fde
bd0e6822.manifest
711 INFO: Found C:\Windows\WinSxS\Manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9279_none_acd3d
86fe1d846c4.manifest
713 INFO: Adding redirect Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0, 30729, 9279)
837 INFO: Caching module hooks...
846 INFO: Analyzing C:\Users\matja\Desktop\unoconv
922 INFO: Processing pre-find module path hook   distutils
2940 INFO: Loading module hooks...
2940 INFO: Loading module hook "hook-distutils.py"...
2942 INFO: Loading module hook "hook-encodings.py"...
3733 INFO: Looking for ctypes DLLs
3733 INFO: Analyzing run-time hooks ...
3740 INFO: Looking for dynamic libraries
3990 INFO: Looking for eggs
3991 INFO: Using Python library C:\Windows\system32\python27.dll
3992 INFO: Found binding redirects:
[BindingRedirect(name=u'Microsoft.VC90.CRT', language=None, arch=u'amd64', oldVersion=(9, 0, 21022, 8), newVersion=(9, 0,
30729, 9279), publicKeyToken=u'1fc8b3b9a1e18e3b')]
4004 INFO: Warnings written to C:\Users\matja\Desktop\build\unoconv\warnunoconv.txt
4101 INFO: checking PYZ
4105 INFO: Building PYZ because out00-PYZ.toc is non existent
4106 INFO: Building PYZ (ZlibArchive) C:\Users\matja\Desktop\build\unoconv\out00-PYZ.pyz
4622 INFO: Building PYZ (ZlibArchive) C:\Users\matja\Desktop\build\unoconv\out00-PYZ.pyz completed successfully.
4710 INFO: checking PKG
4711 INFO: Building PKG because out00-PKG.toc is non existent
4712 INFO: Building PKG (CArchive) out00-PKG.pkg
4758 INFO: Redirecting Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0, 30729, 9279)
6428 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
6436 INFO: Bootloader c:\python27\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
6437 INFO: checking EXE
6437 INFO: Building EXE because out00-EXE.toc is non existent
6438 INFO: Building EXE from out00-EXE.toc
6438 INFO: Appending archive to EXE C:\Users\matja\Desktop\dist\unoconv.exe
6962 INFO: Building EXE from out00-EXE.toc completed successfully.
PS C:\Users\matja\Desktop> .\dist\unoconv.exe --version
  File "C:\Users\matja\Desktop\dist\unoconv.exe", line 1
SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\Users\matja\Desktop\dist\unoconv.exe on line 1, but no encodin
g declared; see http://python.org/dev/peps/pep-0263/ for details
@regebro
Copy link
Member

regebro commented Oct 12, 2017

Unoconv attempts to run itself with the Python instance that is shipped with the Office install. Since pyinstaller attempts to bundle Python with the script I suspect this won't work, even if you build the EXE with the Office Python.

What is your goal with making an EXE?

@regebro
Copy link
Member

regebro commented Feb 19, 2019

Closing for lack of feedback. This can be reopened if needed.

@regebro regebro closed this as completed Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants