devika
devika copied to clipboard
Fix code writing error caused due to variable shadowing
Fix code writing error caused due to variable shadowing, resulting in the following error:
Exception in thread Thread-3 (<lambda>):
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
self.run()
File "/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/threading.py", line 1010, in run
self._target(*self._args, **self._kwargs)
File "/Users/ayomawijethunga/git/devika/devika.py", line 90, in <lambda>
thread = Thread(target=lambda: agent.subsequent_execute(message, project_name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ayomawijethunga/git/devika/src/agents/agent.py", line 216, in subsequent_execute
code = self.feature.execute(
^^^^^^^^^^^^^^^^^^^^^
File "/Users/ayomawijethunga/git/devika/src/agents/feature/feature.py", line 115, in execute
self.emulate_code_writing(valid_response, project_name)
File "/Users/ayomawijethunga/git/devika/src/agents/feature/feature.py", line 89, in emulate_code_writing
code = file["code"]
~~~~^^^^^^^^
TypeError: string indices must be integers, not 'str'