MetaGPT
MetaGPT copied to clipboard
TypeError: '>' not supported between instances of 'str' and 'int'
getting this error below with the command: python startup.py “write a python SEO Checker app” -code_review True
my SERPAPI_API_KEY and OPENAI_API_KEY are set.
2023-09-03 10:45:54.926 | INFO | metagpt.config:init:44 - Config loading done.
2023-09-03 10:45:59.907 | INFO | metagpt.software_company:invest:39 - Investment: $a.
Traceback (most recent call last):
File "/Users/daniellv/metagpt/startup.py", line 68, in
Try to use python3.9.x
@voidking I'm using python 3.11.4 and am having this same issue.
@voidking I'm using python 3.11.4 and am having this same issue.
Try to use python3.9.x
Still not working for me, using py 3.9.4
Still not working for me, using py 3.9.4
git pull
pip install -r requirements.txt
Then try again please.
Thanks for your help; unfortunately: (metagpt) C:\Users<your_username>\Documents\MetaGPT>git pull Already up to date.
(metagpt) C:\Users<your_username>\Documents\MetaGPT>pip install -r requirements.txt Requirement already satisfied: aiohttp==3.8.4 in C:\Users<your_username>\AppData\Local\Anaconda3\envs\metagpt\lib\site-packages (from -r requirements.txt (line 1)) (3.8.4) Requirement already satisfied: channels==4.0.0 in C:\Users<your_username>\AppData\Local\Anaconda3\envs\metagpt\lib\site-packages (from -r requirements.txt (line 3)) (4.0.0) ... Requirement already satisfied: hpack<5,>=4.0 in C:\Users<your_username>\AppData\Local\Anaconda3\envs\metagpt\lib\site-packages (from h2<5,>=3->httpx<1,>=0.23.0->anthropic==0.3.6->-r requirements.txt (line 36)) (4.0.0) Requirement already satisfied: h11<0.15,>=0.13 in C:\Users<your_username>\AppData\Local\Anaconda3\envs\metagpt\lib\site-packages (from httpcore<0.18.0,>=0.15.0->httpx<1,>=0.23.0->anthropic==0.3.6->-r requirements.txt (line 36)) (0.14.0)
I also tried a new clean install; a new env in VS code but I always get this error
I'm not sure if this will help but... After installing py 3.9.11 I was still getting the error. I started printing out the values that the code was complaining about (n_round in this case). It was set to one of the characters in my prompt. I enclosed the prompt in quotations (even though Matthew Berman's tutorial stated that this wasn't necessary) and then the problem disappeared.
I'm not sure if this will help but... After installing py 3.9.11 I was still getting the error. I started printing out the values that the code was complaining about (n_round in this case). It was set to one of the characters in my prompt. I enclosed the prompt in quotations (even though Matthew Berman's tutorial stated that this wasn't necessary) and then the problem disappeared.
Yes, the --n_round should be set to a number. But @daniellopez-2 didn't use the arg.
@yoman38 What command did you execute?
I'm not sure if this will help but... After installing py 3.9.11 I was still getting the error. I started printing out the values that the code was complaining about (n_round in this case). It was set to one of the characters in my prompt. I enclosed the prompt in quotations (even though Matthew Berman's tutorial stated that this wasn't necessary) and then the problem disappeared.
How stupid I am... It didn't work because in my prompt there was python startup.py "beginning of my prompt, a name between quotes like "Alice" then the end of the pronpt" The quotes in between quotes lead to the error in my case
Make sure you escape single or double quotes.
@daniellopez-2 try
python startup.py "write a python SEO Checker app" --code_review True
your command uses wrong double quotes, what you use is Chinese quotation marks.