Weather server missing main function
The weather server script does not run.
```
❯ uv run weather
Traceback (most recent call last):
File "/projects/quickstart-resources/weather-server-python/.venv/bin/weather", line 4, in <module>
from weather import main
ImportError: cannot import name 'main' from 'weather' (/projects/quickstart-resources/weather-server-python/weather.py)
```
The script definition in `pyproject.toml` is looking for a `main` function which does not exist.
This commit is contained in:
parent
dfc92478e2
commit
3bc819fff8
1 changed files with 5 additions and 2 deletions
|
|
@ -89,6 +89,9 @@ Forecast: {period['detailedForecast']}
|
|||
|
||||
return "\n---\n".join(forecasts)
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main():
|
||||
# Initialize and run the server
|
||||
mcp.run(transport='stdio')
|
||||
mcp.run(transport='stdio')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
|||
Loading…
Reference in a new issue