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

Fixing emptystring when appending paddleocr.py directory to PYTHONPATH #9467

Open
wants to merge 1 commit into
base: release/2.6
Choose a base branch
from

Conversation

tymons
Copy link

@tymons tymons commented Mar 17, 2023

Problem

I was trying to use paddleocr within my bazel monorepository. As bazel working directory is different than directory of __file__ I was experiencing error same as in #1024. No tools.infer module was found. I noticed that os.path.dirname(__file__) returns empty string when paddleocr.py is executed from parent directory. I believe the intention was to extend PYTHONPATH with absolute path of paddleocr.py directory.

Fix

Modify __dir__ variable to be absolute path, not relative one.
This will help to address issue #1024 as no real fix was applied so far.

@CLAassistant
Copy link

CLAassistant commented Mar 17, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Successfully merging this pull request may close these issues.

3 participants