Mimesis: I can't compile my project by pyinstaller

Created on 18 Jan 2018  路  6Comments  路  Source: lk-geimfari/mimesis

I have a script with code:

from mimesis import Personal
person = Personal('en')
person.full_name()

and it works well, but after compiling this code to .exe via pyinstaller I have an error FileNotFoundError: [Errno 2] No such file or directory: 'B:\_MEI131682\mimesis\data/es\personal.json'
[20624] Failed to execute script myproject

So, I think that problem in path (data/es\\personal). What ways of solving this problem can you recommend?

bug

Most helpful comment

@h0n3yc4k3 I have fixed this issue (see #376). Now, this should work fine. Can you, please, uninstall an old version (v1.0.4) of mimesis and install latest (v1.0.5) and confirm that issue was fixed. Thanks!

All 6 comments

@h0n3yc4k3 Seems like we have hardcoded path. It's a bug.

@h0n3yc4k3 I have fixed this issue (see #376). Now, this should work fine. Can you, please, uninstall an old version (v1.0.4) of mimesis and install latest (v1.0.5) and confirm that issue was fixed. Thanks!

Yes, it fixed wrong path, but for unknown reasons pyinstaller doesnt import mimesis data :(

@h0n3yc4k3 Possible that the issue on the pyinstaller side. I really have not idea why this happens, sorry.

But I compiled it 馃槃
I added mimesis data to working dir and executed pyinstaller --onefile --add-data mimesis;mimesis myscript.py and now all works fine :)

@h0n3yc4k3 My congratulations! That's awesome.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kairichard picture kairichard  路  6Comments

lk-geimfari picture lk-geimfari  路  4Comments

faheel picture faheel  路  4Comments

jjgriff93 picture jjgriff93  路  5Comments

chris-canipe picture chris-canipe  路  5Comments