Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't compile my project by pyinstaller #375

Closed
dumprop opened this issue Jan 18, 2018 · 6 comments
Closed

I can't compile my project by pyinstaller #375

dumprop opened this issue Jan 18, 2018 · 6 comments
Assignees
Labels
bug

Comments

@dumprop
Copy link

@dumprop dumprop commented Jan 18, 2018

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?

@lk-geimfari
Copy link
Owner

@lk-geimfari lk-geimfari commented Jan 19, 2018

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

@lk-geimfari lk-geimfari added the bug label Jan 19, 2018
@lk-geimfari lk-geimfari assigned duckyou and lk-geimfari and unassigned duckyou Jan 19, 2018
lk-geimfari added a commit that referenced this issue Jan 19, 2018
@lk-geimfari lk-geimfari reopened this Jan 19, 2018
@lk-geimfari
Copy link
Owner

@lk-geimfari lk-geimfari commented Jan 19, 2018

@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!

@dumprop
Copy link
Author

@dumprop dumprop commented Jan 19, 2018

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

@lk-geimfari
Copy link
Owner

@lk-geimfari lk-geimfari commented Jan 19, 2018

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

@dumprop
Copy link
Author

@dumprop dumprop commented Jan 19, 2018

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 :)

@dumprop dumprop closed this Jan 19, 2018
@lk-geimfari
Copy link
Owner

@lk-geimfari lk-geimfari commented Jan 20, 2018

@h0n3yc4k3 My congratulations! That's awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants