CharacterAI icon indicating copy to clipboard operation
CharacterAI copied to clipboard

Argument of type "str" cannot be assigned

Open FalcoTK opened this issue 1 year ago • 6 comments

char = input("input char: ")
chat = client.chat.get_chat(char) #<< here the erorr

then how do I fix it, after I run it once it can't be run again

FalcoTK avatar Feb 25 '24 14:02 FalcoTK

Can you provide more detail like the traceback, etc.

Karvp avatar Feb 25 '24 14:02 Karvp

Can you provide more detail like the traceback, etc. WhatsApp Image 2024-02-25 at 7 02 51 AM

like this?

FalcoTK avatar Feb 25 '24 15:02 FalcoTK

What version of python are u using? Or did u enable type checking in vscode? disable it, in the init of PyCAI, chat has been overwritten with itself, vsc is wrong

Karvp avatar Feb 25 '24 15:02 Karvp

@Karvp No, that not the problem
@FalcoTK hover over it of you have intellisense (vs code feature), here you have "char" so put in client.chat.get_chat(char=char), did notice that its because the class isn't initiated

KubaPro010 avatar Feb 26 '24 21:02 KubaPro010

@KubaPro010 I did mean the class wasn't initiated. Sorry for my messed-up words.

Karvp avatar Feb 27 '24 09:02 Karvp

@Karvp No, that not the problem @FalcoTK hover over it of you have intellisense (vs code feature), here you have "char" so put in client.chat.get_chat(char=char), did notice that its because the class isn't initiated arl bro, thank you :D

FalcoTK avatar Feb 27 '24 10:02 FalcoTK

done

FalcoTK avatar Oct 19 '24 23:10 FalcoTK