Switch to English?
Yes
Переключитись на українську?
Так
Переключиться на русскую?
Да
Przełączyć się na polską?
Tak
Post your project for free and start receiving proposals from freelancers within minutes after publication!

Help with the Bottle in Discord

Translated

  1. 726    9  1
    1 day11 USD

    Hello to you,

    Of course, I am ready to help you solve the problem in your Discord bot. The mistake you’ve encountered is related to data encoding, and it’s apparent when you try to process the text on a particular encoding. For a more accurate analysis of the cause of the error, I will need to read your code.

    Please send me your bot code that is related to data processing and interaction with Discord. You can copy and insert the corresponding section of the code in your message. After that, I will be able to analyze the situation and propose concrete recommendations to fix the problem.

    I'm waiting for your code and ready to help you.

    with respect,
    Vladimir

    1 proposal concealed
  • Yehor I.
    18 August 2023, 11:26 |

    На номер рядка кода вказує помилка?

  • Artem Hanter
    18 August 2023, 11:30 |

    Ні. Це якась загадкова помилка. Ніхто не знає як її виправити та у зв'язку з чим вона взагалі виникає

  • Yehor I.
    18 August 2023, 11:30 |

    Немає нічого тут загадкового.

  • Yehor I.
    18 August 2023, 11:30 |

    І сам файл додайте будь ласка. Можно у ЛС.

  • Artem Hanter
    18 August 2023, 11:48 |

    Файл не дає прикласти. Він за посиланням - https://drive.google.com/file/d/1d_zB0qeSgjiJqSdy6ir8cNzUtC6R5882/view?usp=sharing

  • Yehor I.
    18 August 2023, 12:18 |

    Файл намагається прочитати Ваш скрипт пітону.

  • Yehor I.
    18 August 2023, 12:18 |

    Файл ЯКИЙ намагається прочитати Ваш скрипт пітону.

  • Yehor I.
    18 August 2023, 12:20 |

    І вкажіть НОМЕР РЯКУ на який вказує помилка.

  • Hennadii Y.
    18 August 2023, 12:47 |

    Можете додати файли з текстами? тобто викласти бота та файл uk.txt для тесту

  • Artem Hanter
    18 August 2023, 14:51 |

    Я гадаю вже що це не пов'язано з файлами. Ось лог:

    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/discord/ext/commands/core.py", line 235, in wrapped
        ret = await coro(*args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/artyom/Desktop/Discord Bot/bot.py", line 75, in ask
        index = VectorstoreIndexCreator().from_loaders([loader])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/indexes/vectorstore.py", line 72, in from_loaders
        docs.extend(loader.load())
                    ^^^^^^^^^^^^^
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/document_loaders/directory.py", line 137, in load
        self.load_file(i, p, docs, pbar)
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/document_loaders/directory.py", line 94, in load_file
        raise e
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/document_loaders/directory.py", line 88, in load_file
        sub_docs = self.loader_cls(str(item), **self.loader_kwargs).load()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/document_loaders/unstructured.py", line 86, in load
        elements = self._get_elements()
                   ^^^^^^^^^^^^^^^^^^^^
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/document_loaders/unstructured.py", line 171, in _get_elements
        return partition(filename=self.file_path, **self.unstructured_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/unstructured/partition/auto.py", line 202, in partition
        elements = partition_text(
                   ^^^^^^^^^^^^^^^
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/unstructured/documents/elements.py", line 138, in wrapper
        elements = func(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/unstructured/file_utils/filetype.py", line 519, in wrapper
        elements = func(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/unstructured/partition/text.py", line 114, in partition_text
        encoding, file_text = read_txt_file(filename=filename, encoding=encoding)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/unstructured/file_utils/encoding.py", line 114, in read_txt_file
        formatted_encoding, file_text = detect_file_encoding(filename)
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/unstructured/file_utils/encoding.py", line 92, in detect_file_encoding
        file_text = byte_data.decode(encoding)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
    UnicodeDecodeError: 'gb2312' codec can't decode byte 0xc4 in position 28: illegal multibyte sequence

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
        await ctx.command.invoke(ctx)
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1029, in invoke
        await injected(*ctx.args, **ctx.kwargs)  # type: ignore
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/discord/ext/commands/core.py", line 244, in wrapped
        raise CommandInvokeError(exc) from exc
    discord.ext.commands.errors.CommandInvokeError: Command raised an exception: UnicodeDecodeError: 'gb2312' codec can't decode byte 0xc4 in position 28: illegal multibyte sequence

Current freelance projects in the category Bot Development

Development of a Telegram bot for a personal buyer service (MVP)

Budget: up to 2200 USD Deadline: 4–6 weeksProject Description I am looking for an experienced Python developer to create an MVP Telegram bot for a personal buyer service (purchasing goods from Ukrainian and foreign stores). The project is designed for further scaling, so quality…

Bot Development ∙ 10 hours 38 minutes back ∙ 40 proposals

Telegram chatbot for a closed club

22 USD

Good day! I need to set up a bot for Telegram. Task: selling access to a closed channel. The bot should accept payments and after successful payment, issue a one-time invitation link. It is also necessary to set up automatic removal of a participant from the channel when their…

Bot Development ∙ 18 hours 29 minutes back ∙ 79 proposals

Mini apps Telegram. Store

Good afternoon An application is required in Telegram (online store) Example - essentially 1 to 1 like here brandspacebot Your experience is important, the stack you propose to use and why Price and timeframe approximately to start, I will be waiting for questions

Web ProgrammingBot Development ∙ 20 hours 52 minutes back ∙ 76 proposals

Bots

"I am looking for a programmer to create a turnkey Telegram bot. The bot should be an intelligent conversationalist based on AI (Gemini or ChatGPT), helping people on any topic and in any language. Payment (Monobank or LiqPay) for subscription needs to be integrated as well. I…

Bot Development ∙ 1 day 5 hours back ∙ 55 proposals

Creation of a multifunctional bot in Telegram

22 USD

(I will provide all materials in private messages) Here is a detailed project description: After pressing the button /start The bot sends a text with rules and terms of use (under the text, the button ‘acknowledged’) After pressing the button, the next message is…

PythonBot Development ∙ 1 day 10 hours back ∙ 88 proposals

Client
Artem Hanter
Ukraine Dnepr  7  0
Project published
2 years back
81 views