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

AttributeError: 'NoneType' object has no attribute 'root_relative_path' #1379

Open
krish240574 opened this issue Jul 2, 2024 · 4 comments
Open

Comments

@krish240574
Copy link

krish240574 commented Jul 2, 2024

Bug description

Whenever I run metagpt --project-path <my_existing_project_path> "some new feature/incremental code" , I get the following error:
2024-07-02 11:54:36.567 | ERROR | metagpt.utils.common:wrapper:631 - Exception occurs, start to serialize the project, exp:
Traceback (most recent call last):
File "/root/DBApp/MetaGPT/metagpt/utils/common.py", line 640, in wrapper
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/DBApp/MetaGPT/metagpt/roles/role.py", line 550, in run
rsp = await self.react()
^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'root_relative_path'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/DBApp/MetaGPT/metagpt/utils/common.py", line 626, in wrapper
result = await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/DBApp/MetaGPT/metagpt/team.py", line 131, in run
await self.env.run()
Exception: Traceback (most recent call last):
File "/root/DBApp/MetaGPT/metagpt/utils/common.py", line 640, in wrapper
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/DBApp/MetaGPT/metagpt/roles/role.py", line 550, in run
rsp = await self.react()
^^^^^^^^^^^^^^^^^^
File "/root/DBApp/MetaGPT/metagpt/roles/role.py", line 519, in react
rsp = await self._react()
^^^^^^^^^^^^^^^^^^^
File "/root/DBApp/MetaGPT/metagpt/roles/role.py", line 474, in _react
rsp = await self._act()
^^^^^^^^^^^^^^^^^
File "/root/DBApp/MetaGPT/metagpt/roles/engineer.py", line 149, in _act
return await self._act_write_code()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/DBApp/MetaGPT/metagpt/roles/engineer.py", line 156, in _act_write_code
changed_files = await self._act_sp_with_cr(review=self.use_code_review)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/DBApp/MetaGPT/metagpt/roles/engineer.py", line 121, in _act_sp_with_cr
dependencies.add(coding_context.code_plan_and_change_doc.root_relative_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'root_relative_path'

Bug solved method

Environment information

  • LLM type and model name: gpt-4o, llama-3-70b,, gemini-1.5-flash
  • System version:
  • Ubuntu 24.04
  • Python version:
  • python 3.11
  • MetaGPT version or branch:
    git clone https://github.com/geekan/MetaGPT && cd MetaGPT && pip install --upgrade -e .
@shenchucheng
Copy link
Collaborator

Is the existing project code you want to improve created by MetaGPT?

@krish240574
Copy link
Author

krish240574 commented Jul 5, 2024 via email

@shenchucheng
Copy link
Collaborator

Could you please upload the generated project code? I can try to reproduce this issue.

@krish240574
Copy link
Author

krish240574 commented Jul 5, 2024 via email

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

2 participants