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

Message is too long #493

Open
andruhadranayashluxa opened this issue Dec 13, 2023 · 2 comments
Open

Message is too long #493

andruhadranayashluxa opened this issue Dec 13, 2023 · 2 comments

Comments

@andruhadranayashluxa
Copy link

andruhadranayashluxa commented Dec 13, 2023

hi,i do all things right and when i start bot and try send him a message(not command) and this is what i get
2023-12-13 17:17:37,552 - root - INFO - New message received from user саша блейдмейл (id: 6915028128)
2023-12-13 17:17:38,769 - root - ERROR - ⚠️ Произошла ошибка. ⚠️

<title>Attention Required! | Cloudflare</title> <style>body{margin:0;padding:0}</style> <script> if (!navigator.cookieEnabled) { window.addEventListener('DOMContentLoaded', function () { var cookieEl = document.getElementById('cookie-alert'); cookieEl.style.display = 'block'; }) } </script>

Sorry, you have been blocked

You are unable to access api.openai.com

  <div class="cf-section cf-highlight">
    <div class="cf-wrapper">
      <div class="cf-screenshot-container cf-screenshot-full">

          <span class="cf-no-screenshot error"></span>

      </div>
    </div>
  </div><!-- /.captcha-container -->

  <div class="cf-section cf-wrapper">
    <div class="cf-columns two">
      <div class="cf-column">
        <h2 data-translate="blocked_why_headline">Why have I been blocked?</h2>

        <p data-translate="blocked_why_detail">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.</p>
      </div>

      <div class="cf-column">
        <h2 data-translate="blocked_resolve_headline">What can I do to resolve this?</h2>

        <p data-translate="blocked_resolve_detail">You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.</p>
      </div>
    </div>
  </div><!-- /.section -->

  <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">

Cloudflare Ray ID: 834ed4f41c303aad Your IP: Click to reveal 178.65.220.165 Performance & security by Cloudflare

<script>(function(){function d(){var b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>
</div><!-- /#cf-error-details -->
<script> window._cf_translation = {}; </script> Traceback (most recent call last): File "C:\chatgpt-telegram-bot-main\bot\openai_helper.py", line 261, in __common_get_chat_response return await self.client.chat.completions.create(**common_args) File "C:\chatgpt-telegram-bot-main\venv\lib\site-packages\openai\resources\chat\completions.py", line 1199, in create return await self._post( File "C:\chatgpt-telegram-bot-main\venv\lib\site-packages\openai\_base_client.py", line 1474, in post return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls) File "C:\chatgpt-telegram-bot-main\venv\lib\site-packages\openai\_base_client.py", line 1275, in request return await self._request( File "C:\chatgpt-telegram-bot-main\venv\lib\site-packages\openai\_base_client.py", line 1318, in _request raise self._make_status_error_from_response(err.response) from None openai.PermissionDeniedError: <title>Attention Required! | Cloudflare</title> <style>body{margin:0;padding:0}</style> <script> if (!navigator.cookieEnabled) { window.addEventListener('DOMContentLoaded', function () { var cookieEl = document.getElementById('cookie-alert'); cookieEl.style.display = 'block'; }) } </script>

Sorry, you have been blocked

You are unable to access api.openai.com

  <div class="cf-section cf-highlight">
    <div class="cf-wrapper">
      <div class="cf-screenshot-container cf-screenshot-full">

          <span class="cf-no-screenshot error"></span>

      </div>
    </div>
  </div><!-- /.captcha-container -->

  <div class="cf-section cf-wrapper">
    <div class="cf-columns two">
      <div class="cf-column">
        <h2 data-translate="blocked_why_headline">Why have I been blocked?</h2>

        <p data-translate="blocked_why_detail">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.</p>
      </div>

      <div class="cf-column">
        <h2 data-translate="blocked_resolve_headline">What can I do to resolve this?</h2>

        <p data-translate="blocked_resolve_detail">You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.</p>
      </div>
    </div>
  </div><!-- /.section -->

  <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">

Cloudflare Ray ID: 834ed4f41c303aad Your IP: Click to reveal 178.65.220.165 Performance & security by Cloudflare

<script>(function(){function d(){var b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>
</div><!-- /#cf-error-details -->
<script> window._cf_translation = {}; </script>

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

Traceback (most recent call last):
File "C:\chatgpt-telegram-bot-main\bot\telegram_bot.py", line 697, in prompt
async for content, tokens in stream_response:
File "C:\chatgpt-telegram-bot-main\bot\openai_helper.py", line 176, in get_chat_response_stream
response = await self._common_get_chat_response(chat_id, query, stream=True)
File "C:\chatgpt-telegram-bot-main\venv\lib\site-packages\tenacity_asyncio.py", line 88, in async_wrapped
return await fn(*args, **kwargs)
File "C:\chatgpt-telegram-bot-main\venv\lib\site-packages\tenacity_asyncio.py", line 47, in call
do = self.iter(retry_state=retry_state)
File "C:\chatgpt-telegram-bot-main\venv\lib\site-packages\tenacity_init
.py", line 314, in iter
return fut.result()
File "C:\Users\aagol\AppData\Local\Programs\Python\Python310\lib\concurrent\futures_base.py", line 451, in result
return self.__get_result()
File "C:\Users\aagol\AppData\Local\Programs\Python\Python310\lib\concurrent\futures_base.py", line 403, in __get_result
raise self._exception
File "C:\chatgpt-telegram-bot-main\venv\lib\site-packages\tenacity_asyncio.py", line 50, in call
result = await fn(*args, **kwargs)
File "C:\chatgpt-telegram-bot-main\bot\openai_helper.py", line 270, in __common_get_chat_response
raise Exception(f"⚠️ {localized_text('error', bot_language)}. ⚠️\n{str(e)}") from e
Exception: ⚠️ Произошла ошибка. ⚠️

<title>Attention Required! | Cloudflare</title> <style>body{margin:0;padding:0}</style> <script> if (!navigator.cookieEnabled) { window.addEventListener('DOMContentLoaded', function () { var cookieEl = document.getElementById('cookie-alert'); cookieEl.style.display = 'block'; }) } </script>

Sorry, you have been blocked

You are unable to access api.openai.com

  <div class="cf-section cf-highlight">
    <div class="cf-wrapper">
      <div class="cf-screenshot-container cf-screenshot-full">

          <span class="cf-no-screenshot error"></span>

      </div>
    </div>
  </div><!-- /.captcha-container -->

  <div class="cf-section cf-wrapper">
    <div class="cf-columns two">
      <div class="cf-column">
        <h2 data-translate="blocked_why_headline">Why have I been blocked?</h2>

        <p data-translate="blocked_why_detail">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.</p>
      </div>

      <div class="cf-column">
        <h2 data-translate="blocked_resolve_headline">What can I do to resolve this?</h2>

        <p data-translate="blocked_resolve_detail">You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.</p>
      </div>
    </div>
  </div><!-- /.section -->

  <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">

Cloudflare Ray ID: 834ed4f41c303aad Your IP: Click to reveal 178.65.220.165 Performance & security by Cloudflare

<script>(function(){function d(){var b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>
</div><!-- /#cf-error-details -->
<script> window._cf_translation = {}; </script> 2023-12-13 17:17:38,940 - root - ERROR - Exception while handling an update: Message is too long can someone pls help me? Now i see that i have been blocked on api.openai.com but why? is that because im from russia or something?(On mobile phone i use vpn to log in and i successfully get the api normally,but on pc i dont have a vpn)
@PavelMorozovskiy
Copy link

Use a proxy

@Sindyy3
Copy link

Sindyy3 commented Jan 10, 2024

Мб потому что ты в рф

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

3 participants