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

FileNotFoundError: [Errno 2] Could not locate resource #37

Closed
shunmuga-sundaram opened this issue Jan 14, 2020 · 4 comments
Closed

FileNotFoundError: [Errno 2] Could not locate resource #37

shunmuga-sundaram opened this issue Jan 14, 2020 · 4 comments

Comments

@shunmuga-sundaram
Copy link

shunmuga-sundaram commented Jan 14, 2020

HI I am new to fbs and PyQt
It is very nice tool to generate the executable. I like this very much, Very thankful to your time and effort

I placed the UI file in path "src/main/icons/resources/test.ui"

and call UI in code like
appctxt.get_resource("resources/test.ui")

while I run fbs run, it executes like a charm.
After I create the installer I got the error like
FileNotFoundError: [Errno 2] Could not locate resource

FileNotFoundError: [Errno 2] Could not locate resource: 'resources/test.ui'
[26071] Failed to execute script main

The installer does not consider those files while generating the execution. is i need to mention those files? please guide me

@mherrmann
Copy link
Owner

Hi, place it in src/main/resources/base/test.ui and call appctxt.get_resource('test.ui').

@shunmuga-sundaram
Copy link
Author

Thank you mherrmann, for your reply
After I changed the folder path src/main/resources/base/test.ui

now I am not able to run the project using fbs run
FileNotFoundError: [Errno 2] Could not locate resource: 'test.ui'

while i execute
print(appctxt.get_resource(''))
it shows
/home/sundar/Pictures/pyqtlearn/src/main/icons

is I miss any config statement?

Thanks in advance.

@mherrmann
Copy link
Owner

Please ask on StackOverflow. I'm too busy with my own projects and don't have time to help. Sorry.

@shunmuga-sundaram
Copy link
Author

After placed src/main/resources/base/test.ui it is working fine. I have placed a spelling mistake that is the error. Thank you mherrmann for your help :)

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

No branches or pull requests

2 participants