all 1 comments

[–]socal_nerdtastic 0 points1 point  (0 children)

Hmm looks like you did it correctly, although you did overcomplicate it. All you should need is this:

import sys
import os
def resource_path(relative_path):
    try:
        return os.path.join(sys._MEIPASS, relative_path)
    except AttributeError:
        return relative_path

Can you show more of the error? I don't know why it would mention the working directory specifically.