-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Bug Description
Running the script src/mcp_get_weather/server.py results in the following error:
Traceback (most recent call last):
File "d:\AI\source\copilot-test\src\mcp_get_weather\server.py", line 192, in <module>
main()
File "D:\AI\source\copilot-test\.venv\Lib\site-packages\click\core.py", line 1161, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\source\copilot-test\.venv\Lib\site-packages\click\core.py", line 1082, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "D:\AI\source\copilot-test\.venv\Lib\site-packages\click\core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\source\copilot-test\.venv\Lib\site-packages\click\core.py", line 788, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\AI\source\copilot-test\src\mcp_get_weather\server.py", line 80, in main
level=getattr(logging, loglevel.upper()),
^^^^^^^^
NameError: name 'loglevel' is not defined. Did you mean: 'log_level'?Steps to Reproduce
- Run the script
src/mcp_get_weather/server.py. - Observe the traceback and error.
Expected Behavior
The script should run without errors if the logging level variable is correctly defined.
Actual Behavior
A NameError is raised because loglevel is not defined. The traceback suggests that log_level may be the intended variable name.
Suggested Fix
Check the variable name used for the logging level on line 80 of server.py. If the variable is defined as log_level, update the code to use log_level instead of loglevel.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels