What is wrong with python?

from scrapy.cmdline import execute
import sys

if __name__ == "__main__":
    if sys.argv[1] == "xiaomiquan":
        execute("scrapy crawl %s" % sys.argv[1].split())
    elif sys.argv[1] == "reportapp":
        execute("scrapy crawl %s" % sys.argv[1].split())
    elif sys.argv[1] == "baidusearch":
        execute("scrapy crawl %s" % sys.argv[1].split())

Traceback (most recent call last):
  File "main.py", line 6, in <module>
    execute("scrapy crawl %s" % sys.argv[1].split())
  File "/home/shenjianlin/.local/lib/python3.4/site-packages/scrapy/cmdline.py", line 130, in execute
    cmdname = _pop_command_name(argv)
  File "/home/shenjianlin/.local/lib/python3.4/site-packages/scrapy/cmdline.py", line 58, in _pop_command_name
    del argv[i]
TypeError: "str" object doesn"t support item deletion

Sep.27,2021

what kind of fancy operation is this?
script running crawler, please use the official api, not to change cmdline.
from-a-script" rel=" nofollow noreferrer "> https://doc.scrapy.org/en/lat.


error message is not very clear. Str object does not support element deletion. The sys.argv [1] you passed is an one-step delete operation in scrapy under the use of str,. Use api to read the documents as you said upstairs, don't cmd

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3474b-4d5b3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3474b-4d5b3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?