PC

 
 
IndexError
Python 3.8.16: /usr/bin/python3.8
Wed Jul 3 07:11:07 2024

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /var/www/html/ib/public/tweet/gpt2.py in <module>
    238                         jnichi = ""
    239                 rno = str(rnos[0])
=>  240                 kanji = regex.findall(r'\p{Han}+', txt.replace('日', ''), re.S)[1]
    241                 if kanji == "予想":
    242                         kanji = regex.findall(r'\p{Han}+', txt.replace('日', ''), re.S)[0]
kanji = ['和歌山'], regex = <module 'regex' from '/usr/local/lib64/python3.8/site-packages/regex/__init__.py'>, regex.findall = <function findall>, txt = '和歌山5Rは❓', txt.replace = <built-in method replace of str object>, re = <module 're' from '/usr/lib64/python3.8/re.py'>, re.S = re.DOTALL

IndexError: list index out of range
      args = ('list index out of range',)
      with_traceback = <built-in method with_traceback of IndexError object>