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

SyntaxError: invalid syntax when running uvicorn main:app --reload #266

Open
glejdis opened this issue Nov 23, 2023 · 3 comments
Open

SyntaxError: invalid syntax when running uvicorn main:app --reload #266

glejdis opened this issue Nov 23, 2023 · 3 comments

Comments

@glejdis
Copy link

glejdis commented Nov 23, 2023

INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [62124] using StatReload
Process SpawnProcess-1:
Traceback (most recent call last):
File "c:\users\xx\appdata\local\programs\python\python37\lib\multiprocessing\process.py", line 297, in _bootstrap
self.run()
File "c:\users\xx\appdata\local\programs\python\python37\lib\multiprocessing\process.py", line 99, in run
self._target(*self._args, **self.kwargs)
File "c:\users\xx\appdata\local\programs\python\python37\lib\site-packages\uvicorn_subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "c:\users\xx\appdata\local\programs\python\python37\lib\site-packages\uvicorn\server.py", line 59, in run
return asyncio.run(self.serve(sockets=sockets))
File "c:\users\xx\appdata\local\programs\python\python37\lib\asyncio\runners.py", line 43, in run
return loop.run_until_complete(main)
File "c:\users\xx\appdata\local\programs\python\python37\lib\asyncio\base_events.py", line 587, in run_until_complete
return future.result()
File "c:\users\xx\appdata\local\programs\python\python37\lib\site-packages\uvicorn\server.py", line 66, in serve
config.load()
File "c:\users\xx\appdata\local\programs\python\python37\lib\site-packages\uvicorn\config.py", line 471, in load
self.loaded_app = import_from_string(self.app)
File "c:\users\xx\appdata\local\programs\python\python37\lib\site-packages\uvicorn\importer.py", line 21, in import_from_string
module = importlib.import_module(module_str)
File "c:\users\xx\appdata\local\programs\python\python37\lib\importlib_init
.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in load_unlocked
File "", line 728, in exec_module
File "", line 219, in call_with_frames_removed
File "C:\Users\xx\Desktop\gpt-researcher-master\main.py", line 1, in
from backend.server import app
File "C:\Users\xx\Desktop\gpt-researcher-master\backend\server.py", line 7, in
from gpt_researcher.utils.websocket_manager import WebSocketManager
File "C:\Users\xx\Desktop\gpt-researcher-master\gpt_researcher_init
.py", line 1, in
from .master import GPTResearcher
File "C:\Users\x\Desktop\gpt-researcher-master\gpt_researcher\master_init
.py", line 1, in
from .agent import GPTResearcher
File "C:\Users\xx\Desktop\gpt-researcher-master\gpt_researcher\master\agent.py", line 3, in
from gpt_researcher.master.functions import *
File "C:\Users\xx\Desktop\gpt-researcher-master\gpt_researcher\master\functions.py", line 18
match retriever:
^
SyntaxError: invalid syntax

@assafelovic
Copy link
Owner

Hey @glejdis can you try upgrading your Python to 3.11 and try again?

@callumcui
Copy link

I have same issue, I'm sure, my python version is 3.11

@assafelovic
Copy link
Owner

@callumcui can you share the error logs?

@assafelovic assafelovic reopened this May 20, 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