ValueError: Unknown Mach-O header

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ValueError: Unknown Mach-O header

Krister Swenson
Hello,

I'm trying to build my application with pyinstaller on a mac OSX 10.11.6 system.
I'm using a spec file that I know works for the same code on my Ubuntu system.

Things mostly look normal until the end:

"""
20880 INFO: Building PKG (CArchive) out00-PKG.pkg
.
.
.
ValueError: Unknown Mach-O header: 0x2d2d5b5b in <open file '/Users/theuser/Library/Application Support/pyinstaller/bincache00_py27_64bit/lib/gtdir/bin/gtdata/modules/gtlua.lua', mode 'rb' at 0x10e303420>
"""

Without knowing more details, does this give anyone a hint as to what the problem might be?
I'm not sure where to start in creating a minimal example for this problem.

Thanks for the help.

--
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.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ValueError: Unknown Mach-O header

Hartmut Goebel
Am 20.07.2017 um 12:07 schrieb Krister Swenson:
ValueError: Unknown Mach-O header: 0x2d2d5b5b in <open file '/Users/theuser/Library/Application Support/pyinstaller/bincache00_py27_64bit/lib/gtdir/bin/gtdata/modules/gtlua.lua', mode 'rb' at 0x10e303420>

For some reason a lua file is treated as a shared object file. But I'm curious about the additional path inside the cache directory.

--
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: http://www.goebel-consult.de/blog/nicht-pgp-ist-gescheitert-die-entwickler-haben-versagt
Kolumne: http://www.cissp-gefluester.de/2010-01-hinterturen-allen-ortes

--
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.
For more options, visit https://groups.google.com/d/optout.

0xBF773B65.asc (14K) Download Attachment
smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ValueError: Unknown Mach-O header

Krister Swenson
 
For some reason a lua file is treated as a shared object file. But I'm curious about the additional path inside the cache directory.

I'm not sure how to respond to this...
   are you asking me for more information?

kms
 

--
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="http://www.goebel-consult.de/blog/nicht-pgp-ist-gescheitert-die-entwickler-haben-versagt" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de%2Fblog%2Fnicht-pgp-ist-gescheitert-die-entwickler-haben-versagt\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHOsVKvAfb4ZWg_1HJiATC_T0ZqfA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de%2Fblog%2Fnicht-pgp-ist-gescheitert-die-entwickler-haben-versagt\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHOsVKvAfb4ZWg_1HJiATC_T0ZqfA&#39;;return true;">http://www.goebel-consult.de/blog/nicht-pgp-ist-gescheitert-die-entwickler-haben-versagt
Kolumne: <a style="color:grey!important;text-decoration:none!important" href="http://www.cissp-gefluester.de/2010-01-hinterturen-allen-ortes" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cissp-gefluester.de%2F2010-01-hinterturen-allen-ortes\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFE5y9HDMqsq0pCDuTiwxf857LPMQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cissp-gefluester.de%2F2010-01-hinterturen-allen-ortes\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFE5y9HDMqsq0pCDuTiwxf857LPMQ&#39;;return true;">http://www.cissp-gefluester.de/2010-01-hinterturen-allen-ortes

--
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.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ValueError: Unknown Mach-O header

Krister Swenson
In reply to this post by Hartmut Goebel
For some reason a lua file is treated as a shared object file. But I'm curious about the additional path inside the cache directory.

I'm not sure how to respond...
   are you asking for more information?

 

--
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="http://www.goebel-consult.de/blog/nicht-pgp-ist-gescheitert-die-entwickler-haben-versagt" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de%2Fblog%2Fnicht-pgp-ist-gescheitert-die-entwickler-haben-versagt\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHOsVKvAfb4ZWg_1HJiATC_T0ZqfA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de%2Fblog%2Fnicht-pgp-ist-gescheitert-die-entwickler-haben-versagt\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHOsVKvAfb4ZWg_1HJiATC_T0ZqfA&#39;;return true;">http://www.goebel-consult.de/blog/nicht-pgp-ist-gescheitert-die-entwickler-haben-versagt
Kolumne: <a style="color:grey!important;text-decoration:none!important" href="http://www.cissp-gefluester.de/2010-01-hinterturen-allen-ortes" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cissp-gefluester.de%2F2010-01-hinterturen-allen-ortes\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFE5y9HDMqsq0pCDuTiwxf857LPMQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cissp-gefluester.de%2F2010-01-hinterturen-allen-ortes\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFE5y9HDMqsq0pCDuTiwxf857LPMQ&#39;;return true;">http://www.cissp-gefluester.de/2010-01-hinterturen-allen-ortes

--
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.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ValueError: Unknown Mach-O header

Hartmut Goebel
In reply to this post by Krister Swenson
Am 20.07.2017 um 23:53 schrieb Krister Swenson:
I'm not sure how to respond to this...
   are you asking me for more information?

This is a hint for you for further investigation. Without *minimal* example for reproducing the error it is impossible to do any bug analysis.

--
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: http://www.goebel-consult.de/blog/chatsecure-ist-tot-lang-lebe-chatsecure
Kolumne: http://www.cissp-gefluester.de/2010-06-adobe-und-der-maiszunsler

--
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.
For more options, visit https://groups.google.com/d/optout.

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ValueError: Unknown Mach-O header

Krister Swenson
Thank you Hartmut,

It turns out that I was using "binaries" to include binary programs that I call using subprocess.call() rather than "datas".
I did this because the "Using Spec Files" section of the docs says,  "datas: non-binary files included in the app."

On Friday, July 21, 2017 at 10:27:43 AM UTC+2, Hartmut Goebel wrote:
Am 20.07.2017 um 23:53 schrieb Krister Swenson:
I'm not sure how to respond to this...
   are you asking me for more information?

This is a hint for you for further investigation. Without *minimal* example for reproducing the error it is impossible to do any bug analysis.

--
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="http://www.goebel-consult.de/blog/chatsecure-ist-tot-lang-lebe-chatsecure" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de%2Fblog%2Fchatsecure-ist-tot-lang-lebe-chatsecure\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUBRZw7Bq-43vVbme7LpBcH6dSQg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de%2Fblog%2Fchatsecure-ist-tot-lang-lebe-chatsecure\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUBRZw7Bq-43vVbme7LpBcH6dSQg&#39;;return true;">http://www.goebel-consult.de/blog/chatsecure-ist-tot-lang-lebe-chatsecure
Kolumne: <a style="color:grey!important;text-decoration:none!important" href="http://www.cissp-gefluester.de/2010-06-adobe-und-der-maiszunsler" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cissp-gefluester.de%2F2010-06-adobe-und-der-maiszunsler\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHgqHZA1zKuq9gxuild-JiabyBdGg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cissp-gefluester.de%2F2010-06-adobe-und-der-maiszunsler\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHgqHZA1zKuq9gxuild-JiabyBdGg&#39;;return true;">http://www.cissp-gefluester.de/2010-06-adobe-und-der-maiszunsler

--
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.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ValueError: Unknown Mach-O header

Hartmut Goebel
Am 08.08.2017 um 21:10 schrieb Krister Swenson:
It turns out that I was using "binaries" to include binary programs that I call using subprocess.call() rather than "datas".
I did this because the "Using Spec Files" section of the docs says,  "datas: non-binary files included in the app."

So the manual need to be clarified. I opened an issue for this https://github.com/pyinstaller/pyinstaller/issues/2733

Maybe you want to contribute a new text?

--
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: http://www.goebel-consult.de/blog/artikel-zu-debops-im-ix-magazin
Kolumne: http://www.cissp-gefluester.de/2010-08-scheingefechte-um-rim

--
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.
For more options, visit https://groups.google.com/d/optout.

0xBF773B65.asc (14K) Download Attachment
smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ValueError: Unknown Mach-O header

Krister Swenson
OK...
  so the current version is:
"""
  • datas: non-binary files included in the app, including names given by the --add-data option.
"""

I was thinking of modifying it to be
 "datas: files essential to the app but not included with ``binaries``, including names given by the --add-data option."

It's hard for me to better since I'm not sure exactly what binaries is specifically for.
Could you describe the difference to me?

On Wednesday, August 9, 2017 at 10:37:43 AM UTC+2, Hartmut Goebel wrote:
Am 08.08.2017 um 21:10 schrieb Krister Swenson:
It turns out that I was using "binaries" to include binary programs that I call using subprocess.call() rather than "datas".
I did this because the "Using Spec Files" section of the docs says,  "datas: non-binary files included in the app."

So the manual need to be clarified. I opened an issue for this <a href="https://github.com/pyinstaller/pyinstaller/issues/2733" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fpyinstaller%2Fpyinstaller%2Fissues%2F2733\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_9d4FYsAl2yNseUs68rbUj7xZ_A&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fpyinstaller%2Fpyinstaller%2Fissues%2F2733\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH_9d4FYsAl2yNseUs68rbUj7xZ_A&#39;;return true;">https://github.com/pyinstaller/pyinstaller/issues/2733

Maybe you want to contribute a new text?

--
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="http://www.goebel-consult.de/blog/artikel-zu-debops-im-ix-magazin" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de%2Fblog%2Fartikel-zu-debops-im-ix-magazin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGLyyzMiuS-I-Z4s1Kuk6_HIXnPGg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de%2Fblog%2Fartikel-zu-debops-im-ix-magazin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGLyyzMiuS-I-Z4s1Kuk6_HIXnPGg&#39;;return true;">http://www.goebel-consult.de/blog/artikel-zu-debops-im-ix-magazin
Kolumne: <a style="color:grey!important;text-decoration:none!important" href="http://www.cissp-gefluester.de/2010-08-scheingefechte-um-rim" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cissp-gefluester.de%2F2010-08-scheingefechte-um-rim\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFF_b7FnIGBt1JQ0yTMiZIwSU7oiA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cissp-gefluester.de%2F2010-08-scheingefechte-um-rim\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFF_b7FnIGBt1JQ0yTMiZIwSU7oiA&#39;;return true;">http://www.cissp-gefluester.de/2010-08-scheingefechte-um-rim

--
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.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ValueError: Unknown Mach-O header

Hartmut Goebel
Hi,

Would you mind adding this to the github issue https://github.com/pyinstaller/pyinstaller/issues/2733, please, so it will not get lost in my pile of mails.

 "datas: files essential to the app but not included with ``binaries``, including names given by the --add-data option."

These files not need to be "essential" :-) But as you wrote, we need to tell what is special to "binaries". But please let's discuss this at github.

It's hard for me to better since I'm not sure exactly what binaries is specifically for.
Could you describe the difference to me?
Sorry, I can't out of my head. I'd need to read the source, too.

--
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: http://www.goebel-consult.de/blog/das-fass-ist-voll-grunde-linux-201asystemd2018-zu-meiden
Kolumne: http://www.cissp-gefluester.de/2010-09-mut-zur-beschraenkung

--
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.
For more options, visit https://groups.google.com/d/optout.

0xBF773B65.asc (14K) Download Attachment
smime.p7s (3K) Download Attachment
Loading...