Python Forum
Error with Pyinstaller Modules
Thread Rating:
  • 3 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error with Pyinstaller Modules
#4
>>> s = "C:\Users\sym\Desktop\check\pyinstaller_check.py"
Traceback (most recent call last):
 File "C:\Python36\lib\code.py", line 63, in runsource
   code = self.compile(source, filename, symbol)
 File "C:\Python36\lib\codeop.py", line 168, in __call__
   return _maybe_compile(self.compiler, source, filename, symbol)
 File "C:\Python36\lib\codeop.py", line 99, in _maybe_compile
   raise err1
 File "C:\Python36\lib\codeop.py", line 87, in _maybe_compile
   code1 = compiler(source + "\n", filename, symbol)
 File "C:\Python36\lib\codeop.py", line 133, in __call__
   codeob = compile(source, filename, symbol, self.flags, 1)
 File "<interactive input>", line 1
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
You can not use C:\U in python 3.
Turn all backslash the other way,as you should always do or double up \\.
>>> s = "C:/Users/sym/Desktop/check/pyinstaller_check.py"
>>> s
'C:/Users/sym/Desktop/check/pyinstaller_check.py'
Here a run with pyinstaller and the code you have postet.
I use virtual environment which now is build into Python 3.5 -->.
Virtual environment is great for not messing with OS installed Python versions.

Here the run from start to hello.exe.
I use cmder,but is't just the same in cmd.
Reply


Messages In This Thread
Error with Pyinstaller Modules - by sym - Jan-16-2017, 10:33 AM
RE: Error with Pyinstaller Modules - by sym - Jan-19-2017, 08:24 AM
RE: Error with Pyinstaller Modules - by wavic - Jan-19-2017, 09:03 AM
RE: Error with Pyinstaller Modules - by snippsat - Jan-19-2017, 06:27 PM
RE: Error with Pyinstaller Modules - by sym - Jan-20-2017, 02:22 PM
RE: Error with Pyinstaller Modules - by snippsat - Jan-20-2017, 03:49 PM
RE: Error with Pyinstaller Modules - by sym - Jan-20-2017, 04:14 PM
RE: Error with Pyinstaller Modules - by snippsat - Jan-21-2017, 01:31 AM
RE: Error with Pyinstaller Modules - by sym - Jan-23-2017, 08:56 AM
RE: Error with Pyinstaller Modules - by sym - Jan-23-2017, 04:12 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020