Не могу понять почему перед записью данных из словаря в программу возникает ошибка TypeError: join() argument must be str, bytes, or os.PathLike object, not 'int'. Фрагмент кода:
elif message.text == "Создать задачу":
sent = bot.send_message(message.chat.id, "Введите имя задачи")
bot.register_next_step_handler(sent, descr)
def descr(message):
user_name[message.chat.id] = message.text
sent1 = bot.send_message(message.chat.id, "Введите описание задачи")
bot.register_next_step_handler(sent1, date)
def date(message):
user_description[message.chat.id] = message.text
sent2 = bot.send_message(message.chat.id,
"До какого месяца числа дня (в формате месяц (на английском) число год)")
bot.register_next_step_handler(sent2, out)
def out(message):
c = client.ClickUpClient(user_clickup[message.chat.id])
user_date[message.chat.id] = message.text
print(user_name[message.chat.id], user_description[message.chat.id], user_date[message.chat.id])
c.create_task(user_list[message.chat.id], name=str(user_name[message.chat.id]), description=str(user_description[message.chat.id]), due_date=str(user_date[message.chat.id]))
bot.send_message(message.chat.id, f"Задача {str(user_name[message.chat.id])} создана.")
Полный вывод консоли:
2022-09-14 12:19:10,292 (__init__.py:878 MainThread) ERROR - TeleBot: "Infinity polling exception: join() argument must be str, bytes, or os.PathLike object, not 'int'"
2022-09-14 12:19:10,296 (__init__.py:880 MainThread) ERROR - TeleBot: "Exception traceback:
Traceback (most recent call last):
File "C:\Users\Simon\PycharmProjects\pythonProject2\venv\lib\site-packages\telebot\__init__.py", line 874, in infinity_polling
self.polling(non_stop=True, timeout=timeout, long_polling_timeout=long_polling_timeout,
File "C:\Users\Simon\PycharmProjects\pythonProject2\venv\lib\site-packages\telebot\__init__.py", line 946, in polling
self.__threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,
File "C:\Users\Simon\PycharmProjects\pythonProject2\venv\lib\site-packages\telebot\__init__.py", line 1021, in __threaded_polling
raise e
File "C:\Users\Simon\PycharmProjects\pythonProject2\venv\lib\site-packages\telebot\__init__.py", line 977, in __threaded_polling
self.worker_pool.raise_exceptions()
File "C:\Users\Simon\PycharmProjects\pythonProject2\venv\lib\site-packages\telebot\util.py", line 154, in raise_exceptions
raise self.exception_info
File "C:\Users\Simon\PycharmProjects\pythonProject2\venv\lib\site-packages\telebot\util.py", line 98, in run
task(*args, **kwargs)
File "C:\Users\Simon\PycharmProjects\pythonProject2\testik.py", line 151, in out
print(user_name[message.chat.id], user_description[message.chat.id], user_date[message.chat.id])
File "C:\Users\Simon\PycharmProjects\pythonProject2\venv\lib\site-packages\clickupython\client.py", line 683, in create_task
created_task = self.__post_request(
File "C:\Users\Simon\PycharmProjects\pythonProject2\venv\lib\site-packages\clickupython\client.py", line 76, in __post_request
path = formatting.url_join(API_URL, model, *additionalpath)
File "C:\Users\Simon\PycharmProjects\pythonProject2\venv\lib\site-packages\clickupython\helpers\formatting.py", line 7, in url_join
return urllib.parse.urljoin(host, posixpath.join(model, *additional_path))
File "C:\Users\Simon\AppData\Local\Programs\Python\Python310\lib\posixpath.py", line 90, in join
genericpath._check_arg_types('join', a, *p)
File "C:\Users\Simon\AppData\Local\Programs\Python\Python310\lib\genericpath.py", line 152, in _check_arg_types
raise TypeError(f'{funcname}() argument must be str, bytes, or '
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'int'