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

Error "ERROR:'NoneType' object has no attribute 'ask'" whenever I try to type something. #145

Open
GustavRaispits opened this issue Mar 30, 2024 · 9 comments

Comments

@GustavRaispits
Copy link

Unfortunately this started happening for a while already, even with cookies set. Probably a Bing's site update.

zLoaj5c

@GustavRaispits GustavRaispits changed the title Error "ERROR:'NoneType' object has no attribute 'ask'" whenever I try to typèe something. Error "ERROR:'NoneType' object has no attribute 'ask'" whenever I try to type something. Mar 30, 2024
@FuseFairy
Copy link
Owner

try new version v1.1.4

@GustavRaispits
Copy link
Author

try new version v1.1.4

I've already tried version 1.1.4, even tried to do a fresh install some minutes ago, no difference.

@FuseFairy
Copy link
Owner

This is not a code problem.

Possible solutions:

  1. Try using a Microsoft account from another country.
  2. Try using a VPN.

@GustavRaispits
Copy link
Author

GustavRaispits commented Apr 11, 2024

This is not a code problem.

Possible solutions:

  1. Try using a Microsoft account from another country.
  2. Try using a VPN.

I've been trying to use copilot with a VPN without any result, I've even tried to run the script on another pc with Python 3.11.5.

Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\copilot\DiscordBot-EdgeGPT\src\bing_chat\response.py", line 78, in send_message
reply = await chatbot.ask(
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ask'

I currently don't have a Microsoft account from another country [I'm from Italy], the bot was working perfectly with my account as well until I didn't open this report.

@FuseFairy FuseFairy added the bug Something isn't working label Apr 12, 2024
@FuseFairy FuseFairy reopened this Apr 12, 2024
@FuseFairy
Copy link
Owner

@GustavRaispits
Copy link
Author

GustavRaispits commented Apr 13, 2024

try latest response.py code https://github.com/FuseFairy/DiscordBot-EdgeGPT/blob/main/src/bing_chat/response.py

Tried it on a fresh install, I'm getting the same exact issue.
7SDZ6FK

I've also ran the pip install -r requirements.txt command for ensuring that every requirement was correctly installed, it didn't make any difference either

@FuseFairy
Copy link
Owner

strange, try run with Replit.

https://replit.com/@dd8611706/DiscordBot-EdgeGPT

@FuseFairy FuseFairy removed the bug Something isn't working label Apr 14, 2024
@GustavRaispits
Copy link
Author

strange, try run with Replit.

https://replit.com/@dd8611706/DiscordBot-EdgeGPT

Hello, works with replit after setting cookies.

When I run the script on my machine and set my cookies as well, I get this issue:

2OkNKXt

Instead of using Python version 3.10 I'll try to use the same python version as Replit uses, I'll update you soon.

@FuseFairy
Copy link
Owner

FuseFairy commented Apr 14, 2024

I think it's not the python version problem.
You can use !upload command to upload cookies directly instead of setting cookies.json file.
Similar to what you do with Replit, use env for storage.

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

2 participants