Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

As of next week, passwords will be entered in Morse code.


devel / comp.lang.python / Re: PyInstaller value error: Invalid Windows resource specifier

SubjectAuthor
o Re: PyInstaller value error: Invalid Windows resource specifierMRAB

1
Re: PyInstaller value error: Invalid Windows resource specifier

<mailman.102.1698701476.3828.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24273&group=comp.lang.python#24273

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!rocksolid2!news.neodome.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: pyt...@mrabarnett.plus.com (MRAB)
Newsgroups: comp.lang.python
Subject: Re: PyInstaller value error: Invalid Windows resource specifier
Date: Mon, 30 Oct 2023 21:28:07 +0000
Lines: 58
Message-ID: <mailman.102.1698701476.3828.python-list@python.org>
References: <002201da0b66$00940000$01bc0000$@ncf.ca>
<189c82d3-e698-4b79-b0a9-4d69b4fb2400@mrabarnett.plus.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 5Cf49wkjQiqwSdgs3NpXjwUyTU0JquZZtvJ2/BX5JcGQ==
Cancel-Lock: sha1:U/Ha6r95BKmz6H57j6kptudo9Po= sha256:n9nmAPPV5wlhMQbvjMz7IoPFj58cVLhZuaoMsX0JRFA=
Return-Path: <python@mrabarnett.plus.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=plus.com header.i=@plus.com header.b=DdAjNjxH;
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'debug': 0.07;
'subject:Windows': 0.07; 'subject:error': 0.07; 'subject:value':
0.07; 'from:addr:python': 0.09; 'moved': 0.09;
'received:192.168.1.64': 0.09; 'valueerror:': 0.09; 'problem.':
0.15; '.py': 0.16; '5000': 0.16; '[snip]': 0.16; 'arbitrary':
0.16; 'command-line': 0.16; 'command:': 0.16; 'compiled': 0.16;
'complete.': 0.16; 'executable': 0.16;
'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16;
'message-id:@mrabarnett.plus.com': 0.16; 'pyinstaller': 0.16;
'received:plus.net': 0.16; 'recursion': 0.16; 'says:': 0.16;
'skip:" 60': 0.16; 'subject:Invalid': 0.16; 'subject:PyInstaller':
0.16; 'wrote:': 0.16; 'python': 0.16; 'to:addr:python-list': 0.20;
'problem,': 0.22; 'version': 0.23; 'skip:- 10': 0.25; 'skip:d 60':
0.26; 'greatly': 0.28; 'output': 0.28; 'header:User-Agent:1':
0.30; 'program': 0.31; 'files,': 0.32; 'python-list': 0.32;
'received:192.168.1': 0.32; 'but': 0.32; 'there': 0.33; 'windows':
0.34; 'able': 0.34; 'appreciated.': 0.34; 'work.': 0.34; 'header
:In-Reply-To:1': 0.34; 'running': 0.34; 'trying': 0.35; 'invalid':
0.35; 'using': 0.37; 'received:192.168': 0.37; 'file': 0.38;
'least': 0.39; 'hello,': 0.40; 'should': 0.40; 'family': 0.60;
'format': 0.62; 'received:212': 0.62; 'you.': 0.71; 'virtual':
0.71; 'points': 0.84; 'mcdermott': 0.84; 'skip:" 50': 0.84;
"skip:' 70": 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019;
t=1698701288; bh=Gi9qfscb288CgQhJD7wbfILqI8DAr7CrLA8S5Q8Mf08=;
h=Date:Subject:To:References:From:In-Reply-To;
b=DdAjNjxH/NvcJBYGKoJ6qRk+YJVywTD8bFq0OEvseuXbimX8BAb6v6gE19wV5Zrer
/5+5L3458QKgHBz3ffR5693vdazZS0xJ1gjZEtcnf8qwPsIrDzcXx0CnGcLm8P/kkZ
ng3GTXNs7VTB+/OpIDbymcE9LxYFrEhcSltvwvfIECgvJJyyRVtQ6/7F7toLsv4Lvk
khbqt4KrU/YmEwEHCcQELrhRWadhrY0icyvBjew3LUJEYR8rebpbA9A05zbyjeq3ss
Tx3tsypK9Un1QbRPtqVu6Z+3EoXiALR8QipKrKcis6c5rFWEQIZ+Um1bvHulxgnjEi
3qDEGbQL9PoqA==
X-Clacks-Overhead: "GNU Terry Pratchett"
X-CM-Score: 0.00
X-CNFS-Analysis: v=2.4 cv=Iv8NzZzg c=1 sm=1 tr=0 ts=65401fe8
a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17
a=IkcTkHD0fZMA:10 a=soSLv8sjQ1QnhvbombYA:9 a=QEXdDO2ut3YA:10
X-AUTH: mrabarnett@:2500
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <002201da0b66$00940000$01bc0000$@ncf.ca>
X-CMAE-Envelope: MS4xfDcYjPMnbN31JLm4fAV9nOwLkB0eurgca2HLOPnVguXesw9kVRtazPHHt2ZzQsm3h31eOisPsP7+m9+9YbnSlW9D+q0l5OgX9gWQMmuAfjB9lzdvRwb/
KY5CexqzU/GLR+6InRXFs6VmqZosuSk/B8cPPwzPK1DE/bvsJHc6HPN+ExzAhBLttu8y90eJNUlF/BrITfXhx6UpxrmDlC/grOs=
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <189c82d3-e698-4b79-b0a9-4d69b4fb2400@mrabarnett.plus.com>
X-Mailman-Original-References: <002201da0b66$00940000$01bc0000$@ncf.ca>
 by: MRAB - Mon, 30 Oct 2023 21:28 UTC

On 2023-10-30 19:19, McDermott Family via Python-list wrote:
> Hello, I am trying to create a one file executable with pyinstaller 6.1.0
> and auto-py-to-exe 2.41.0 using Python version 3.10.9 in a virtual
> environment.
>
> Some points before the output of pinstaller is shown. My resource .py file
> is there where it should be. Also I can fun my program from the command-line
>
>
> and it does work with the compiled resource file without a problem. Any help
> would be greatly appreciated. Thank you.
>
>
> Running auto-py-to-exe v2.41.0
>
> Building directory: C:\Users\icnte\AppData\Local\Temp\tmpp870eytg
>
> Provided command: pyinstaller --noconfirm --onefile --windowed --icon
> "D:/Work/Python/cfepy310/xl/cfegui/Resources/Conform-e_48_1.ico" --name
> "Conform-e" --clean --log-level "DEBUG" --debug "all" --version-file
> "D:/Work/Python/cfepy310/xl/cfegui/cfe_versionfile.txt" --resource
> "D:/Work/Python/cfepy310/xl/cfegui/cfe_Resource_rc.py"
> "D:/Work/Python/cfepy310/xl/cfegui/cfe_MainForm.py"
>
> Recursion Limit is set to 5000
>
> Executing: pyinstaller --noconfirm --onefile --windowed --icon
> D:/Work/Python/cfepy310/xl/cfegui/Resources/Conform-e_48_1.ico --name
> Conform-e --clean --log-level DEBUG --debug all --version-file
> D:/Work/Python/cfepy310/xl/cfegui/cfe_versionfile.txt --resource
> D:/Work/Python/cfepy310/xl/cfegui/cfe_Resource_rc.py
> D:/Work/Python/cfepy310/xl/cfegui/cfe_MainForm.py --distpath
> C:\Users\icnte\AppData\Local\Temp\tmpp870eytg\application --workpath
> C:\Users\icnte\AppData\Local\Temp\tmpp870eytg\build --specpath
> C:\Users\icnte\AppData\Local\Temp\tmpp870eytg
>
[snip]
>
> ValueError: Invalid Windows resource specifier
> 'D:\\\\Work\\\\Python\\\\cfepy310\\\\xl\\\\cfegui\\\\cfe_Resource_rc.py'!
> For arbitrary data file, the format is 'filename,type,name,[language]'!
>
>
>
> Project output will not be moved to output folder
>
> Complete.
>
In the docs for "--resource" it says:

"""FILE can be a data file or an exe/dll. For data files, at least TYPE
and NAME must be specified."""

That might be the problem, but I haven't been able to find out what
"TYPE" means!

I also wonder whether "--add-data" would work.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor