Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python3] TypeError: expected string or bytes-like object #111

Open
takano32 opened this issue Feb 17, 2024 · 2 comments
Open

[Python3] TypeError: expected string or bytes-like object #111

takano32 opened this issue Feb 17, 2024 · 2 comments

Comments

@takano32
Copy link
Collaborator

発生しがちエラー

Traceback (most recent call last):
  File "/var/www/cgi-bin/sub/sun.cgi", line 1540, in <module>
    no.say(slack=no.is_slack, lingr=False)
  File "/var/www/cgi-bin/sub/sun.cgi", line 1520, in say
    resp = "\n".join(tuple(self.response())).rstrip("\n")
  File "/var/www/cgi-bin/sub/sun.cgi", line 1490, in response
    if pattern.search(text):
TypeError: expected string or bytes-like object

#110 がマージされたら型ヒントで消す。

@takano32
Copy link
Collaborator Author

修正を入れた。

d42df57

参考

https://stackoverflow.com/questions/43727583/

@takano32
Copy link
Collaborator Author

格納するときに str に変換するようにした。

7abe078

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant