pyinstaller command rejects --add-data flag in command line, works in .spec file - Windows 10

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

pyinstaller command rejects --add-data flag in command line, works in .spec file - Windows 10

Amir Katz
I tried this command (which does work fine w/o the --add-data option):

    (venv-374) pyinstaller --path .\venv-374\lib\site-packages --add-data 'resources:resources' .\notification-tool.py

and I get this error:

    pyinstaller: error: argument --add-data: invalid add_data_or_binary value: 'resources:resources'

When I added this in the .spec file, I was able to add my files:

    datas=[('resources', 'resources')],

If this is a known bug, apologies in advance.

Thanks,
Amir

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/e17d0fd5-99cd-4556-bf66-8ccafbd6a384%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: pyinstaller command rejects --add-data flag in command line, works in .spec file - Windows 10

Hartmut Goebel
Am 16.07.19 um 16:14 schrieb Amir Katz:

    pyinstaller: error: argument --add-data: invalid add_data_or_binary value: 'resources:resources'


Please read the manual and use --help to learn about the correct syntax.


--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog: https://www.goe-con.de/blog/gemeinsam-die-gala-zur-verleihung-der-der-bigbrotherawards-gucken
Kolumne: https://www.goe-con.de/hartmut-goebel/cissp-gefluester/2010-07-passwoerter-lieben-lernen

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/728e5b9f-4fbd-3712-c6bd-56f30eb5e7ff%40goebel-consult.de.
For more options, visit https://groups.google.com/d/optout.

0x7B752811BF773B65.asc (16K) Download Attachment
smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: pyinstaller command rejects --add-data flag in command line, works in .spec file - Windows 10

Amir Katz
Hartmut, thank you. A clear case of RTFM :-(. 
I saw an example somewhere that was using the ':' and they did not say it was for Linux (that's my excuse...)
Anyway, I did switch to using the spec file because I added it to git, with the rest of the project, so I don't have to remember the command line syntax every time.

On Tuesday, July 16, 2019 at 5:41:12 PM UTC+3, Hartmut Goebel wrote:
Am 16.07.19 um 16:14 schrieb Amir Katz:

    pyinstaller: error: argument --add-data: invalid add_data_or_binary value: 'resources:resources'


Please read the manual and use --help to learn about the correct syntax.


--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
<a style="color:black" href="http://www.goebel-consult.de" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHs4zUB0fQIL_Yg4brDiF83WXvPcg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHs4zUB0fQIL_Yg4brDiF83WXvPcg&#39;;return true;">http://www.goebel-consult.de

Blog: <a style="color:grey!important;text-decoration:none!important" href="https://www.goe-con.de/blog/gemeinsam-die-gala-zur-verleihung-der-der-bigbrotherawards-gucken" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.goe-con.de%2Fblog%2Fgemeinsam-die-gala-zur-verleihung-der-der-bigbrotherawards-gucken\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEMWtx6EfW3EcWSd5F7U1WLaOCu3Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.goe-con.de%2Fblog%2Fgemeinsam-die-gala-zur-verleihung-der-der-bigbrotherawards-gucken\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEMWtx6EfW3EcWSd5F7U1WLaOCu3Q&#39;;return true;">https://www.goe-con.de/blog/gemeinsam-die-gala-zur-verleihung-der-der-bigbrotherawards-gucken
Kolumne: <a style="color:grey!important;text-decoration:none!important" href="https://www.goe-con.de/hartmut-goebel/cissp-gefluester/2010-07-passwoerter-lieben-lernen" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.goe-con.de%2Fhartmut-goebel%2Fcissp-gefluester%2F2010-07-passwoerter-lieben-lernen\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHrdBMA2qvXE5RIt23yMyf7VY_Agw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.goe-con.de%2Fhartmut-goebel%2Fcissp-gefluester%2F2010-07-passwoerter-lieben-lernen\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHrdBMA2qvXE5RIt23yMyf7VY_Agw&#39;;return true;">https://www.goe-con.de/hartmut-goebel/cissp-gefluester/2010-07-passwoerter-lieben-lernen

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/36a9ec8e-6906-4a05-be52-10a5195de5bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: pyinstaller command rejects --add-data flag in command line, works in .spec file - Windows 10

Thor Tepper-Garcia
In reply to this post by Amir Katz
Hi,

I'm finding a related problem.

Pyinstaller v3.1 on Mac (Capitan) does not appear to have the --add-data option at all.

Typing, e.g.:

$> pyinstaller --add-data='myfile.txt' myscript.py

Fails with:

error: unrecognized arguments: --add-data=


Typing:

$> pyinstaller -h

indeed reveals that the option '--add-data' is not available under section
'what to bundle, where to search', in contrast to the documentation.

Any ideas?

Thanks.

On Wednesday, July 17, 2019 at 12:37:54 AM UTC+10, Amir Katz wrote:
I tried this command (which does work fine w/o the --add-data option):

    (venv-374) pyinstaller --path .\venv-374\lib\site-packages --add-data 'resources:resources' .\notification-tool.py

and I get this error:

    pyinstaller: error: argument --add-data: invalid add_data_or_binary value: 'resources:resources'

When I added this in the .spec file, I was able to add my files:

    datas=[('resources', 'resources')],

If this is a known bug, apologies in advance.

Thanks,
Amir

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/8c1eb1e8-cd79-49f4-b355-95cc563f683f%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: pyinstaller command rejects --add-data flag in command line, works in .spec file - Windows 10

abhishek bhatta
Hello,

I believe the --add-data flag in the command line was introduced in a later version of pyinstaller. It should work in your .spec file with the "datas=" flag.

For more information visit: https://pypi.org/project/PyInstaller/3.1.1/

Regards,
Abhishek


On Friday, April 10, 2020 at 9:25:57 PM UTC+5:30, ttepperg wrote:
Hi,

I'm finding a related problem.

Pyinstaller v3.1 on Mac (Capitan) does not appear to have the --add-data option at all.

Typing, e.g.:

$> pyinstaller --add-data='myfile.txt' myscript.py

Fails with:

error: unrecognized arguments: --add-data=


Typing:

$> pyinstaller -h

indeed reveals that the option '--add-data' is not available under section
'what to bundle, where to search', in contrast to the documentation.

Any ideas?

Thanks.

On Wednesday, July 17, 2019 at 12:37:54 AM UTC+10, Amir Katz wrote:
I tried this command (which does work fine w/o the --add-data option):

    (venv-374) pyinstaller --path .\venv-374\lib\site-packages --add-data 'resources:resources' .\notification-tool.py

and I get this error:

    pyinstaller: error: argument --add-data: invalid add_data_or_binary value: 'resources:resources'

When I added this in the .spec file, I was able to add my files:

    datas=[('resources', 'resources')],

If this is a known bug, apologies in advance.

Thanks,
Amir

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/23d9dca5-06f6-4533-9f4f-0a9218357ebf%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: pyinstaller command rejects --add-data flag in command line, works in .spec file - Windows 10

Eric Fahlgren
In reply to this post by Thor Tepper-Garcia
PyInstaller v 3.1 is over four years old, so not too surprising that this option is missing.  Update your installation, "pip install --upgrade pyinstaller" and it should appear.

On Fri, Apr 10, 2020 at 8:55 AM ttepperg <[hidden email]> wrote:
Hi,

I'm finding a related problem.

Pyinstaller v3.1 on Mac (Capitan) does not appear to have the --add-data option at all.

Typing, e.g.:

$> pyinstaller --add-data='myfile.txt' myscript.py

Fails with:

error: unrecognized arguments: --add-data=


Typing:

$> pyinstaller -h

indeed reveals that the option '--add-data' is not available under section
'what to bundle, where to search', in contrast to the documentation.

Any ideas?

Thanks.

On Wednesday, July 17, 2019 at 12:37:54 AM UTC+10, Amir Katz wrote:
I tried this command (which does work fine w/o the --add-data option):

    (venv-374) pyinstaller --path .\venv-374\lib\site-packages --add-data 'resources:resources' .\notification-tool.py

and I get this error:

    pyinstaller: error: argument --add-data: invalid add_data_or_binary value: 'resources:resources'

When I added this in the .spec file, I was able to add my files:

    datas=[('resources', 'resources')],

If this is a known bug, apologies in advance.

Thanks,
Amir

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/8c1eb1e8-cd79-49f4-b355-95cc563f683f%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/CAP2Qz%2BWACa3b-AMEMP%2BbFYzAEKPEn0oEOztvx4gZEZW8supx4w%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: pyinstaller command rejects --add-data flag in command line, works in .spec file - Windows 10

Thor Tepper-Garcia
Hi Eric,

Thanks for your answer.

> PyInstaller v 3.1 is over four years old, so not too surprising that this option is missing.
> Update your installation, "pip install --upgrade pyinstaller" and it should appear.
I see, my bad.

Sadly, version 3.1 is the most recent one available through MacPorts.
Based on my experience, is not a good idea to mix packages installed
via MacPorts and pip, so I’ll stick to the older version for now.

Thanks again!

Thor.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/34BBB97D-5D4C-4E6B-B9EA-616EE6DE9447%40gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: pyinstaller command rejects --add-data flag in command line, works in .spec file - Windows 10

Thor Tepper-Garcia
In reply to this post by abhishek bhatta
Hi Abishek,

Thanks for your reply.
That works indeed as I had discovered early.

Cheers,

-----------------------------------------------
Dr. Thorsten Tepper García
Astrophysicist
www.thorsten.mx







> On 11 Apr 2020, at 02:06, abhishek bhatta <[hidden email]> wrote:
>
> Hello,
>
> I believe the --add-data flag in the command line was introduced in a later version of pyinstaller. It should work in your .spec file with the "datas=" flag.
>
> For more information visit: https://pypi.org/project/PyInstaller/3.1.1/
>
> Regards,
> Abhishek
>
>
> On Friday, April 10, 2020 at 9:25:57 PM UTC+5:30, ttepperg wrote:
> Hi,
>
> I'm finding a related problem.
>
> Pyinstaller v3.1 on Mac (Capitan) does not appear to have the --add-data option at all.
>
> Typing, e.g.:
>
> $> pyinstaller --add-data='myfile.txt' myscript.py
>
> Fails with:
>
> error: unrecognized arguments: --add-data=
>
>
> Typing:
>
> $> pyinstaller -h
>
> indeed reveals that the option '--add-data' is not available under section
> 'what to bundle, where to search', in contrast to the documentation.
>
> Any ideas?
>
> Thanks.
>
> On Wednesday, July 17, 2019 at 12:37:54 AM UTC+10, Amir Katz wrote:
> I tried this command (which does work fine w/o the --add-data option):
>
>     (venv-374) pyinstaller --path .\venv-374\lib\site-packages --add-data 'resources:resources' .\notification-tool.py
>
> and I get this error:
>
>     pyinstaller: error: argument --add-data: invalid add_data_or_binary value: 'resources:resources'
>
> When I added this in the .spec file, I was able to add my files:
>
>     datas=[('resources', 'resources')],
>
> If this is a known bug, apologies in advance.
>
> Thanks,
> Amir
>
>
> --
> You received this message because you are subscribed to the Google Groups "PyInstaller" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/23d9dca5-06f6-4533-9f4f-0a9218357ebf%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/1F42CD48-8FF0-4377-8657-25EABF018F7F%40gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: pyinstaller command rejects --add-data flag in command line, works in .spec file - Windows 10

Hartmut Goebel
In reply to this post by Thor Tepper-Garcia
Am 10.04.20 um 07:13 schrieb ttepperg:
Pyinstaller v3.1 on

Thi sis an outdated version. Please use acurrent one (3.6)

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog: https://www.goe-con.de/blog/kamera-safari-durch-die-munchner-innenstadt
Kolumne: https://www.goe-con.de/hartmut-goebel/cissp-gefluester/2011-08-horrorszenario-bring-your-own-device

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/278f46f2-e47c-e3a9-ac1d-ff014be6cf44%40goebel-consult.de.

0x7B752811BF773B65.asc (21K) Download Attachment