Dear Duane, Brénainn,

I did essentially what Brénainn suggested, although I did not see their
reply until now; so I figured it out myself, and very much the hard way ;)
I simply copied the file config.ini file into my script’s dir and used the
flag —add-data config.ini:pynbody

The trick is, as Brénainn mentioned, to understand that the dir structure
of packages within the Python dist are mirrored by the temporary dir
created at runtime. So my app was looking for the file within the <temp dir
path>/pynbody but it was not there; also, —add-data config.ini:. did not
help as this was binding the file into the parent dir.

Hope this helps others in similar situations.

Thor.

On Wed, 20 May 2020 at 10:16 pm, Duane Kaufman <[email protected]>
wrote:

> Dear ttepperg,
>
> If it is not too hard to do, a quick overview of what you had to do to fix
> this problem may help someone in the future.
>
> Sincerely,
> Duane
>
> On Wednesday, May 20, 2020 at 1:56:49 AM UTC-5, ttepperg wrote:
>>
>> I have solved the issue.
>>
>> It might be useful in other circumstances; I'm more than happy to provide
>> the details if anyone is interested.
>>
>>
>> On Thursday, May 7, 2020 at 7:51:44 PM UTC+10, ttepperg wrote:
>>>
>>> Hi,
>>>
>>> With the simplest script possible that only contains the following
>>> statement:
>>>
>>> import pynbody
>>>
>>> I get a weird error when trying to run the exe file (error message
>>> attached).
>>>
>>>
>>> Pynbody is a library installed in a standard location, the same one in
>>> which
>>> PyInstaller resides. Needless to say, I don't have the problem when
>>> running
>>> the script from source (or any other more meaningful script using this
>>> library),
>>> so the problem is happening at runtime.
>>>
>>> I'm using PyInstaller 3.5 with Python 3.6 on a Mac (High Sierra).
>>>
>>> Thanks a lot in advance for your 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pyinstaller/ec9c2499-b53f-4a0b-8801-4bdaf15247b2%40googlegroups.com
> <https://groups.google.com/d/msgid/pyinstaller/ec9c2499-b53f-4a0b-8801-4bdaf15247b2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/CAHit8qNWqCBbhDthd6Awy5KhxgQ75t2Zd68RtKr8mrUg1mPLsg%40mail.gmail.com.

Reply via email to