Comments (5)
Hey can you check out the documentation here: https://docs.gptr.dev/docs/gpt-researcher/pip-package
from gpt-researcher.
Yes, I already did that, it's where I got the FastAPI example from.
gpt-researcher is installed correctly, I even reran it to confirm.
Result is the same error.
...
File "E:\Source Control\AI Apps\Python\nextjs-fastapi\.venv\Lib\site-packages\gpt_researcher\master\agent.py", line 77, in conduct_research
[1] await stream_output("logs", f"\U0001f50e Starting the research task for '{self.query}'...", self.websocket)
[1] File "E:\Source Control\AI Apps\Python\nextjs-fastapi\.venv\Lib\site-packages\gpt_researcher\master\actions.py", line 321, in stream_output
[1] print(output)
[1] File "D:\Python\Lib\encodings\cp1252.py", line 19, in encode
[1] return codecs.charmap_encode(input,self.errors,encoding_table)[0]
[1] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[1] UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f50e' in position 0: character maps to <undefined>
from gpt-researcher.
Update:
I noticed in the error above:
File "D:\Python\Lib\encodings\cp1252.py", line 19, in encode
[1] return codecs.charmap_encode(input,self.errors,encoding_table)[0]
Which is inconsistent with the venv paths.
So I tried a solution from https://stackoverflow.com/questions/18589146/how-to-use-encoding-utf-8-py-instead-of-cp1252-py-in-python ie: Run python with the -X utf8 option.
Instead of running
"python -m uvicorn api.index:app --reload"
run
"python -X utf8 -m uvicorn api.index:app --reload"
and that seems to work.
However, it gets the following ECONNRESET errors periodically during the output in the terminal in VSCode, resulting in an "Internal Server Error" on the FE, though it continues the processing.
[0] Failed to proxy http://127.0.0.1:8000/api/report/What%20is%2042%3F/outline_report Error: socket hang up
[0] at connResetException (node:internal/errors:720:14)
[0] at Socket.socketCloseListener (node:_http_client:474:25)
[0] at Socket.emit (node:events:529:35)
[0] at TCP.<anonymous> (node:net:350:12)
[0] at TCP.callbackTrampoline (node:internal/async_hooks:128:17) {
[0] code: 'ECONNRESET'
[0] }
[0] Error: socket hang up
[0] at connResetException (node:internal/errors:720:14)
[0] at Socket.socketCloseListener (node:_http_client:474:25)
[0] at Socket.emit (node:events:529:35)
[0] at TCP.<anonymous> (node:net:350:12)
[0] at TCP.callbackTrampoline (node:internal/async_hooks:128:17) {
[0] code: 'ECONNRESET'
[0] }
from gpt-researcher.
Going to switch to vue to see if I get rid of the ECONNRESET errors.
Seems to be an issue with nextjs https://www.google.com/search?q=ECONNRESET+fastapi+nextjs
from gpt-researcher.
Ok, switched to Quasar/Vue for the FE and working aok.
Ty, closing this now.
from gpt-researcher.
Related Issues (20)
- Output style issues + did not manage to locate a library called 'gobject-2.0-0' HOT 8
- "FileNotFoundError: [Errno 2] No such file or directory" with particular prompts HOT 2
- multi-agents module seems to be using gpt-4o no matter what is specified as "model" in task.json HOT 1
- BUG: Crash due to inconsistent arguments passed to GPTResearcher() constructor HOT 1
- TypeError in Config class initialization and ensure proper type handling and directory validation. Solution Provided! HOT 1
- Research across multiple sources HOT 3
- Error with new tone feature when doing a research HOT 6
- Docker buildx to linux/amd64 from Mac M1 throws "system lacks support for the sse3 instruction set" HOT 2
- How to use own .env file? HOT 3
- KeyError: 'Objective (impartial and unbiased presentation of facts and findings)' HOT 2
- raise ImportError( ImportError: lxml.html.clean module is now a separate project lxml_html_clean. Install lxml[html_clean] or lxml_html_clean directly. HOT 9
- ERROR: Exception in ASGI application when running with Ollama. HOT 5
- Researcher using links from previous calls HOT 7
- gpt-researcher 0.8.0 pip package no longer works with anthropic models HOT 7
- context_length_exceeded HOT 2
- TypeError: the JSON object must be str, bytes or bytearray, not coroutine HOT 5
- Visualization issues :graph.get_graph(xray=1).draw_mermaid_png() HOT 1
- docs.gptr.dev unavailable HOT 5
- KeyError: 'snippet' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt-researcher.