Closed beichenlpl closed 1 year ago
We can process this first according to this, and later we will release a new version to fix this problem. https://github.com/towhee-io/towhee/pull/2653
ok,thanks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Rotten issues close after 30d of inactivity. Close the stale issues and pull requests after 7 days of inactivity. Reopen the issue with /reopen
.
TypeError: argument of type 'WindowsPath' is not iterable
This error still exists for towhee 1.1.3.
from towhee import AutoPipes
# get the built-in text_image_embedding pipeline
image_embedding = AutoPipes.pipeline('text_image_embedding')
# generate image embedding
embedding = image_embedding('./test1.png').get()
# batch generate image embeddings
embeddings = image_embedding.batch(['./test1.png', './test2.png'])
embeddings = [e.get() for e in embeddings]
Error stack is:
2024-08-30 09:46:27,302 - 23796 - operator_loader.py-operator_loader:134 - ERROR: argument of type 'WindowsPath' is not iterable, Traceback (most recent call last):
File "C:\Users\wensi\anaconda3\envs\workspace\lib\site-packages\towhee\runtime\operator_manager\operator_loader.py", line 131, in _load_operator_from_hub
path = get_operator(operator=function, tag=tag, latest=latest)
File "C:\Users\wensi\anaconda3\envs\workspace\lib\site-packages\towhee\hub\__init__.py", line 23, in get_operator
return _CACHE_MANAGER.get_operator(operator, tag, install_reqs, latest)
File "C:\Users\wensi\anaconda3\envs\workspace\lib\site-packages\towhee\hub\cache_manager.py", line 97, in get_operator
download_operator(author, repo, tag, download_path, install_reqs, latest)
File "C:\Users\wensi\anaconda3\envs\workspace\lib\site-packages\towhee\hub\downloader.py", line 178, in download_operator
subprocess.check_call([sys.executable, '-m', 'pip', 'install', '-r', fs.requirements])
File "C:\Users\wensi\anaconda3\envs\workspace\lib\subprocess.py", line 358, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Users\wensi\anaconda3\envs\workspace\lib\subprocess.py", line 339, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\wensi\anaconda3\envs\workspace\lib\subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "C:\Users\wensi\anaconda3\envs\workspace\lib\subprocess.py", line 1148, in _execute_child
args = list2cmdline(args)
File "C:\Users\wensi\anaconda3\envs\workspace\lib\subprocess.py", line 555, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'WindowsPath' is not iterable
Is there an existing issue for this?
Current Behavior
When I run this code:
AutoPipes.pipeline('sentence_embedding')
report ERROR: argument of type 'WindowsPath' is not iterableExpected Behavior
No response
Steps To Reproduce
Environment
Anything else?
No response