Coder Social home page Coder Social logo

Comments (27)

Jimmy-Z avatar Jimmy-Z commented on August 24, 2024 2

I did a little debug, and I think I've found the bug: just remove br from accept-encoding header.

explanation:

  • AFAICT requests doesn't handle brotli
  • bing doesn't actually use brotli so it's fine if you're using your own cookie
  • but the shared service will

from edgegpt.

PetterZhukov avatar PetterZhukov commented on August 24, 2024 1

python3 -m EdgeGPT

I re-pip the moduel ,but I still met this error, that's so bad

from edgegpt.

leolrg avatar leolrg commented on August 24, 2024 1

I did a little debug, and I think I've found the bug: just remove br from accept-encoding header.

Thanks! it worked!

from edgegpt.

KyleZhang0536 avatar KyleZhang0536 commented on August 24, 2024 1

I did a little debug, and I think I've found the bug: just remove br from accept-encoding header.

Works for me

from edgegpt.

PetterZhukov avatar PetterZhukov commented on August 24, 2024

I also met this problem

from edgegpt.

PetterZhukov avatar PetterZhukov commented on August 24, 2024
raceback (most recent call last):
  File "/Users/leolrg/Library/Python/3.9/lib/python/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/leolrg/Downloads/EdgeGPT/src/EdgeGPT.py", line 135, in __init__
    self.struct = response.json()
  File "/Users/leolrg/Library/Python/3.9/lib/python/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/leolrg/Downloads/EdgeGPT/src/EdgeGPT.py", line 293, in <module>
    asyncio.run(main())
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/Users/leolrg/Downloads/EdgeGPT/src/EdgeGPT.py", line 254, in main
    bot = Chatbot()
  File "/Users/leolrg/Downloads/EdgeGPT/src/EdgeGPT.py", line 203, in __init__
    self.chat_hub: ChatHub = ChatHub(Conversation())
  File "/Users/leolrg/Downloads/EdgeGPT/src/EdgeGPT.py", line 137, in __init__
    raise Exception(
TypeError: __init__() missing 3 required positional arguments: 'msg', 'doc', and 'pos'

#2 let‘s see this issue,it solve the same problem

from edgegpt.

leolrg avatar leolrg commented on August 24, 2024

let‘s see this issue,it solve the same problem

No that one is the old version where you need your own Cookies.

from edgegpt.

leolrg avatar leolrg commented on August 24, 2024

run python -m EdgeGPT "MY_COOKIES" and get same as error above.

You ran into the same problem even with your own cookies that has beta access?

from edgegpt.

PetterZhukov avatar PetterZhukov commented on August 24, 2024

it may be solved if you get access ,I guess; I have joined the waitlist,too. And I met the same problem

from edgegpt.

leolrg avatar leolrg commented on August 24, 2024

it may be solved if you get access ,I guess; I have joined the waitlist,too. And I met the same problem

The new version is supposed to use someone else's shared account that has the beta access so we do not need to use our own cookies.

from edgegpt.

PetterZhukov avatar PetterZhukov commented on August 24, 2024

it may be solved if you get access ,I guess; I have joined the waitlist,too. And I met the same problem

The new version is supposed to use someone else's shared account that has the beta access so we do not need to use our own cookies.

oh I know,is 'python -m EdgeGPT' ?I try it and met the same error ,too. Yes, there may be other reasons

from edgegpt.

acheong08 avatar acheong08 commented on August 24, 2024

Hello. The reason is because it didn't update properly

from edgegpt.

acheong08 avatar acheong08 commented on August 24, 2024

You have to completely uninstall it and reinstall

pip3 uninstall EdgeGPT

pip3 install EdgeGPT

from edgegpt.

acheong08 avatar acheong08 commented on August 24, 2024

Python caches are weird

from edgegpt.

acheong08 avatar acheong08 commented on August 24, 2024

run python -m EdgeGPT "MY_COOKIES" and get same as error above.

This means your cookies aren't valid. Just run it as python3 -m EdgeGPT without any other agruments

from edgegpt.

leolrg avatar leolrg commented on August 24, 2024

You have to completely uninstall it and reinstall
pip3 uninstall EdgeGPT
pip3 install EdgeGPT

Didn't work. I even downloaded the repository and use it instead of the pip version but got the same error.

from edgegpt.

acheong08 avatar acheong08 commented on August 24, 2024

Didn't work. I even downloaded the repository and use it instead of the pip version but got the same error.

git clone https://github.com/acheong08/EdgeGPT
cd EdgeGPT
pip3 install .

Is that how you did it?

from edgegpt.

leolrg avatar leolrg commented on August 24, 2024

Is that how you did it?

I download the repository and

cd EdgeGPT/src
python3 EdgeGPT.py

from edgegpt.

acheong08 avatar acheong08 commented on August 24, 2024

Yeah, don't do that. Just pip3 install . inside the directory and python3 -m EdgeGPT

If you have it cloned, remember to git pull

from edgegpt.

acheong08 avatar acheong08 commented on August 24, 2024

I update very frequently so always update to the latest version

from edgegpt.

zjrwtx avatar zjrwtx commented on August 24, 2024

I did a little debug, and I think I've found the bug: just remove br from accept-encoding header.

explanation:

  • AFAICT requests doesn't handle brotli
  • bing doesn't actually use brotli so it's fine if you're using your own cookie
  • but the shared service will

image
i have tried it ,but it still not works,is it my error?

from edgegpt.

Jimmy-Z avatar Jimmy-Z commented on August 24, 2024

Are you using your own cookie? are you still on the waitlist?

from edgegpt.

zjrwtx avatar zjrwtx commented on August 24, 2024

Are you using your own cookie? are you still on the waitlist?

i use the public server,Without a cookie

from edgegpt.

Jimmy-Z avatar Jimmy-Z commented on August 24, 2024

Are you using your own cookie? are you still on the waitlist?

i use the public server,Without a cookie

Try my fork (or wait for my pr to be merged), should have a more informational exception output
https://github.com/Jimmy-Z/EdgeGPT

from edgegpt.

zjrwtx avatar zjrwtx commented on August 24, 2024

Are you using your own cookie? are you still on the waitlist?

i use the public server,Without a cookie

Try my fork (or wait for my pr to be merged), should have a more informational exception output https://github.com/Jimmy-Z/EdgeGPT

thanks,it works

from edgegpt.

acheong08 avatar acheong08 commented on August 24, 2024

I did a little debug, and I think I've found the bug: just remove br from accept-encoding header.

Works for me

That's interesting. Might be a difference in our request versions. I'm fixing now

from edgegpt.

acheong08 avatar acheong08 commented on August 24, 2024

from edgegpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.