Closed rohit-jll closed 1 year ago
here is my requirement .txt fastapi[all]==0.99.0 fastapi-health==0.4.0 loguru==0.6.0 python-dotenv==0.19.2 pydantic==1.9.0 requests==2.26.0 pyctuator==0.18.1 psutil==5.9.0
Ah, pyctuator was updated to support fastapi 0.100.0 and above and will be released soon. Once released, I suggest you'll upgrade fastapi to ^0.100.0
Please upgrade to pyctuator 1.1.0
/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/fastapi/utils.py:162: RuntimeWarning: fields may not start with an underscore, ignoring "_links" new_field.populate_validators() Traceback (most recent call last): File "/Users/rohit.ajaiswal/user_mgmt_venv/bin/uvicorn", line 8, in
sys.exit(main())
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/click/core.py", line 1130, in call
return self.main(args, kwargs)
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(args, kwargs)
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/uvicorn/main.py", line 425, in main
run(app, kwargs)
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/uvicorn/main.py", line 447, in run
server.run()
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/uvicorn/server.py", line 68, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/local/Cellar/python@3.8/3.8.16/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/uvicorn/server.py", line 76, in serve
config.load()
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/uvicorn/config.py", line 448, in load
self.loaded_app = import_from_string(self.app)
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/uvicorn/importer.py", line 21, in import_from_string
module = importlib.import_module(module_str)
File "/usr/local/Cellar/python@3.8/3.8.16/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/rohit.ajaiswal/user_management/jll-azara-v2-user-management-app/./app/main.py", line 70, in
Pyctuator(
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/pyctuator/pyctuator.py", line 130, in init
success = framework_integration_function(app, self.pyctuator_impl, customizer)
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/pyctuator/pyctuator.py", line 197, in _integrate_fastapi
FastApiPyctuator(app, pyctuator_impl, False, customizer)
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/pyctuator/impl/fastapi_pyctuator.py", line 77, in init
def get_health() -> HealthSummary:
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/fastapi/routing.py", line 669, in decorator
self.add_api_route(
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/fastapi/routing.py", line 608, in add_api_route
route = route_class(
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/fastapi/routing.py", line 416, in init
self.response_field = create_response_field(
File "/Users/rohit.ajaiswal/user_mgmt_venv/lib/python3.8/site-packages/fastapi/utils.py", line 92, in create_response_field
return ModelField(
File "pydantic/fields.py", line 419, in pydantic.fields.ModelField.init
File "pydantic/fields.py", line 539, in pydantic.fields.ModelField.prepare
File "pydantic/fields.py", line 801, in pydantic.fields.ModelField.populate_validators
File "pydantic/validators.py", line 683, in find_validators
File "pydantic/dataclasses.py", line 266, in make_dataclass_validator
f'repr={self.repr!r},'
File "pydantic/dataclasses.py", line 255, in pydantic.dataclasses.dataclass
if metadata is None else
File "pydantic/dataclasses.py", line 250, in pydantic.dataclasses.dataclass.wrap
self.init = init
File "pydantic/dataclasses.py", line 186, in pydantic.dataclasses._process_class
objects. Also used to check if a class is a Data Class.
File "pydantic/main.py", line 972, in pydantic.main.create_model File "pydantic/main.py", line 204, in pydantic.main.ModelMetaclass.new File "pydantic/fields.py", line 488, in pydantic.fields.ModelField.infer File "pydantic/fields.py", line 419, in pydantic.fields.ModelField.init File "pydantic/fields.py", line 534, in pydantic.fields.ModelField.prepare File "pydantic/fields.py", line 728, in pydantic.fields.ModelField._type_analysis File "pydantic/fields.py", line 778, in pydantic.fields.ModelField._create_sub_type File "pydantic/fields.py", line 419, in pydantic.fields.ModelField.init File "pydantic/fields.py", line 539, in pydantic.fields.ModelField.prepare File "pydantic/fields.py", line 801, in pydantic.fields.ModelField.populate_validators File "pydantic/validators.py", line 683, in find_validators File "pydantic/dataclasses.py", line 266, in make_dataclass_validator f'repr={self.repr!r},' File "pydantic/dataclasses.py", line 255, in pydantic.dataclasses.dataclass if metadata is None else File "pydantic/dataclasses.py", line 250, in pydantic.dataclasses.dataclass.wrap self.init = init File "pydantic/dataclasses.py", line 186, in pydantic.dataclasses._process_class
objects. Also used to check if a class is a Data Class.
File "pydantic/main.py", line 972, in pydantic.main.create_model File "pydantic/main.py", line 204, in pydantic.main.ModelMetaclass.new File "pydantic/fields.py", line 488, in pydantic.fields.ModelField.infer File "pydantic/fields.py", line 419, in pydantic.fields.ModelField.init File "pydantic/fields.py", line 539, in pydantic.fields.ModelField.prepare File "pydantic/fields.py", line 801, in pydantic.fields.ModelField.populate_validators File "pydantic/validators.py", line 683, in find_validators File "pydantic/dataclasses.py", line 266, in make_dataclass_validator f'repr={self.repr!r},' File "pydantic/dataclasses.py", line 255, in pydantic.dataclasses.dataclass if metadata is None else File "pydantic/dataclasses.py", line 250, in pydantic.dataclasses.dataclass.wrap self.init = init File "pydantic/dataclasses.py", line 149, in pydantic.dataclasses._process_class
@dataclass).
AttributeError: type object 'HealthDetails' has no attribute 'annotations'