Pyra
Pyra
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
You are welcome!
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
I can't help much with it, may be @Hugo can
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
Cool
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
Oh, yeah, that was the cause, I just thought your resolver put it there for a reason
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
Does it work in vscode?
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
Yep, that seems to work for me as well without that workaround ☺️
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
I would like to run it through diff
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
Noise, can you share the new lockfile?
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
may be just backup requirements.txt and let windmill generate lockfile
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
might be actually related to lockfile generation..
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
hmh, that is strange
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
What about webapp/cloud?
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
@Osmar Can you try this workaround?
# requirements:
# pathlib==1.0.1
import sys
# Iterate over paths and remove the one that contains pathlib. It will make it use builtin version of pathlib
sys.path = [path for path in sys.path if 'pathlib' not in path]

import pathlib

def main():
print("Hello Osmar :)")
print(pathlib)
# requirements:
# pathlib==1.0.1
import sys
# Iterate over paths and remove the one that contains pathlib. It will make it use builtin version of pathlib
sys.path = [path for path in sys.path if 'pathlib' not in path]

import pathlib

def main():
print("Hello Osmar :)")
print(pathlib)
Just add this:
import sys
# Iterate over paths and remove the one that contains pathlib. It will make it use builtin version of pathlib
sys.path = [path for path in sys.path if 'pathlib' not in path]
import sys
# Iterate over paths and remove the one that contains pathlib. It will make it use builtin version of pathlib
sys.path = [path for path in sys.path if 'pathlib' not in path]
Before importing that: imprt pathlib (Or before importing any package in case you dont import pathlib directly)
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
(I'm offline for next 2 hours, but the fix likely to be done today)
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
For example. This will work:
import pathlib
import pathlib
And this won't:
# requirements:
# pathlib==1.0.1
import pathlib
# requirements:
# pathlib==1.0.1
import pathlib
In first case we import pathlib as builtin, when in second one we import it explicitly from pypi.org
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
We include additional flags and cache the result while resolution, but it is ok to do it that way. I just wanted to know what top-level libraries are used. Anyways I found failing library it is pathlib==1.0.1. This library is supported by python 3.4 and older, after that it became builtin and not maintained anymore. For libraries that still referencing non-builtin pathlib python has some sort of fallback or override to that builtin pathlib in /usr/lib64/python3.11/pathlib.py But for some reason in windmill that path is not found or does not contain pathlib.py. That explains why it runs on local machine but fails on cloud. I'm investigating this rn.
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
nvm, I can reproduce on cloud, I can work off that
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
Are these inserted by hand, or output of resolver, e.g. uv pip compile requirements.in -o requirements.txt ?
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
I will try to reproduce with provided packages
68 replies
WWindmill
Created by Osmar on 1/8/2025 in #help
Hey guys im getting an error using PyMuPDF python lib
It is probably different issue
68 replies