Skip to content

getting error on Could not parse index from entry #65

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

Open
PriyangshuMazumderWfx opened this issue Apr 29, 2025 · 3 comments
Open

getting error on Could not parse index from entry #65

PriyangshuMazumderWfx opened this issue Apr 29, 2025 · 3 comments

Comments

@PriyangshuMazumderWfx
Copy link

get the following error log while using ollama as model and running

python main.py --dir /Users/priyangshu.mazumder/Desktop/POC/object-service/server/src --include "*"

Traceback (most recent call last):
  File "/Users/priyangshu.mazumder/Desktop/POC/PocketFlow-Tutorial-Codebase-Knowledge/nodes.py", line 178, in exec
    idx = int(str(idx_entry).strip())
ValueError: invalid literal for int() with base 10: 'main/java/com/whatfix/Migration/NonOSMigration/DataReaderPipelineNonOs.java'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/priyangshu.mazumder/Desktop/POC/PocketFlow-Tutorial-Codebase-Knowledge/main.py", line 84, in <module>
    main()
    ~~~~^^
  File "/Users/priyangshu.mazumder/Desktop/POC/PocketFlow-Tutorial-Codebase-Knowledge/main.py", line 81, in main
    tutorial_flow.run(shared)
    ~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/Users/priyangshu.mazumder/Desktop/POC/.venv/lib/python3.13/site-packages/pocketflow/__init__.py", line 16, in run
    return self._run(shared)
           ~~~~~~~~~^^^^^^^^
  File "/Users/priyangshu.mazumder/Desktop/POC/.venv/lib/python3.13/site-packages/pocketflow/__init__.py", line 50, in _run
    def _run(self,shared): p=self.prep(shared); o=self._orch(shared); return self.post(shared,p,o)
                                                  ~~~~~~~~~~^^^^^^^^
  File "/Users/priyangshu.mazumder/Desktop/POC/.venv/lib/python3.13/site-packages/pocketflow/__init__.py", line 48, in _orch
    while curr: curr.set_params(p); last_action=curr._run(shared); curr=copy.copy(self.get_next_node(curr,last_action))
                                                ~~~~~~~~~^^^^^^^^
  File "/Users/priyangshu.mazumder/Desktop/POC/.venv/lib/python3.13/site-packages/pocketflow/__init__.py", line 13, in _run
    def _run(self,shared): p=self.prep(shared); e=self._exec(p); return self.post(shared,p,e)
                                                  ~~~~~~~~~~^^^
  File "/Users/priyangshu.mazumder/Desktop/POC/.venv/lib/python3.13/site-packages/pocketflow/__init__.py", line 33, in _exec
    if self.cur_retry==self.max_retries-1: return self.exec_fallback(prep_res,e)
                                                  ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/Users/priyangshu.mazumder/Desktop/POC/.venv/lib/python3.13/site-packages/pocketflow/__init__.py", line 28, in exec_fallback
    def exec_fallback(self,prep_res,exc): raise exc
                                          ^^^^^^^^^
  File "/Users/priyangshu.mazumder/Desktop/POC/.venv/lib/python3.13/site-packages/pocketflow/__init__.py", line 31, in _exec
    try: return self.exec(prep_res)
                ~~~~~~~~~^^^^^^^^^^
  File "/Users/priyangshu.mazumder/Desktop/POC/PocketFlow-Tutorial-Codebase-Knowledge/nodes.py", line 184, in exec
    raise ValueError(f"Could not parse index from entry: {idx_entry} in item {item['name']}")
ValueError: Could not parse index from entry: main/java/com/whatfix/Migration/NonOSMigration/DataReaderPipelineNonOs.java in item NonOS Migration Data Reader Pipeline
@zachary62
Copy link
Member

Could you use a more capable model like gemini 2.5 pro?
This issue is caused because the model is not capable enough to follow the yaml instruction.

@nazmy
Copy link

nazmy commented Apr 30, 2025

I'm using gemini-2.5-pro-preview-03-25 from google AI Studio, but encounter similar error:
File "/Users/jamier/Documents/source/playground/PocketFlow-Tutorial-Codebase-Knowledge/nodes.py", line 178, in exec
idx = int(str(idx_entry).strip())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'None'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/jamier/Documents/source/playground/PocketFlow-Tutorial-Codebase-Knowledge/main.py", line 84, in
main()
File "/Users/jamier/Documents/source/playground/PocketFlow-Tutorial-Codebase-Knowledge/main.py", line 81, in main
tutorial_flow.run(shared)
File "/Users/jamier/.pyenv/versions/3.12.4/lib/python3.12/site-packages/pocketflow/init.py", line 16, in run
return self._run(shared)
^^^^^^^^^^^^^^^^^
File "/Users/jamier/.pyenv/versions/3.12.4/lib/python3.12/site-packages/pocketflow/init.py", line 50, in _run
def _run(self,shared): p=self.prep(shared); o=self._orch(shared); return self.post(shared,p,o)
^^^^^^^^^^^^^^^^^^
File "/Users/jamier/.pyenv/versions/3.12.4/lib/python3.12/site-packages/pocketflow/init.py", line 48, in _orch
while curr: curr.set_params(p); last_action=curr._run(shared); curr=copy.copy(self.get_next_node(curr,last_action))
^^^^^^^^^^^^^^^^^
File "/Users/jamier/.pyenv/versions/3.12.4/lib/python3.12/site-packages/pocketflow/init.py", line 13, in _run
def _run(self,shared): p=self.prep(shared); e=self._exec(p); return self.post(shared,p,e)
^^^^^^^^^^^^^
File "/Users/jamier/.pyenv/versions/3.12.4/lib/python3.12/site-packages/pocketflow/init.py", line 33, in _exec
if self.cur_retry==self.max_retries-1: return self.exec_fallback(prep_res,e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jamier/.pyenv/versions/3.12.4/lib/python3.12/site-packages/pocketflow/init.py", line 28, in exec_fallback
def exec_fallback(self,prep_res,exc): raise exc
^^^^^^^^^
File "/Users/jamier/.pyenv/versions/3.12.4/lib/python3.12/site-packages/pocketflow/init.py", line 31, in _exec
try: return self.exec(prep_res)
^^^^^^^^^^^^^^^^^^^
File "/Users/jamier/Documents/source/playground/PocketFlow-Tutorial-Codebase-Knowledge/nodes.py", line 184, in exec
raise ValueError(f"Could not parse index from entry: {idx_entry} in item {item['name']}")
ValueError: Could not parse index from entry: None in item Database Models (SQLAlchemy)

@zachary62
Copy link
Member

😅 It looks like the model messes up the yaml...
This is common for weaker model, but I'm surprised that gemini 2.5 pro will make such error
Could you double check if the model is really gemini 2.5 pro, and rerun that?
If it doesn't work, do you mind send the repo link? I will try it on my machine.

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

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy