[ 2024-03-23 21:24:51,407 ] 96 werkzeug - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
- Running on all addresses (0.0.0.0)
- Running on http://127.0.0.1:5000
- Running on http://192.168.16.14:5000 [ 2024-03-23 21:24:51,407 ] 96 werkzeug - INFO - [33mPress CTRL+C to quit[0m [ 2024-03-23 21:25:05,643 ] 96 werkzeug - INFO - 127.0.0.1 - - [23/Mar/2024 21:25:05] "GET /predictdata HTTP/1.1" 200 - [ 2024-03-23 21:25:06,049 ] 96 werkzeug - INFO - 127.0.0.1 - - [23/Mar/2024 21:25:06] "GET /predictdata HTTP/1.1" 200 - [ 2024-03-23 21:25:17,418 ] 825 app - ERROR - Exception on /predictdata [POST] Traceback (most recent call last): File "C:\Users\kolhe\result_predict\src\pipeline\predict_pipeline.py", line 19, in predict data_scaled=preprocessor.transform(features) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\sklearn\utils_set_output.py", line 295, in wrapped data_to_wrap = f(self, X, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\sklearn\compose_column_transformer.py", line 1014, in transform Xs = self._call_func_on_transformers( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\sklearn\compose_column_transformer.py", line 823, in _call_func_on_transformers return Parallel(n_jobs=self.n_jobs)(jobs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\sklearn\utils\parallel.py", line 67, in call return super().call(iterable_with_config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\joblib\parallel.py", line 1088, in call while self.dispatch_one_batch(iterator): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\joblib\parallel.py", line 901, in dispatch_one_batch self._dispatch(tasks) File "C:\Users\kolhe\anaconda3\Lib\site-packages\joblib\parallel.py", line 819, in _dispatch job = self._backend.apply_async(batch, callback=cb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\joblib_parallel_backends.py", line 208, in apply_async result = ImmediateResult(func) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\joblib_parallel_backends.py", line 597, in init self.results = batch() ^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\joblib\parallel.py", line 288, in call return [func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\joblib\parallel.py", line 288, in return [func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\sklearn\utils\parallel.py", line 129, in call return self.function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\sklearn\pipeline.py", line 1283, in _transform_one res = transformer.transform(X, **params.transform) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\sklearn\pipeline.py", line 905, in transform Xt = transform.transform(Xt, **routed_params[name].transform) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\sklearn\utils_set_output.py", line 295, in wrapped data_to_wrap = f(self, X, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\anaconda3\Lib\site-packages\sklearn\preprocessing_encoders.py", line 1032, in transform if self._drop_idx_after_grouping is not None: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'OneHotEncoder' object has no attribute '_drop_idx_after_grouping'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\kolhe\AppData\Roaming\Python\Python311\site-packages\flask\app.py", line 1455, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\AppData\Roaming\Python\Python311\site-packages\flask\app.py", line 869, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\AppData\Roaming\Python\Python311\site-packages\flask\app.py", line 867, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\AppData\Roaming\Python\Python311\site-packages\flask\app.py", line 852, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\result_predict\app.py", line 39, in predict_datapoint results=predict_pipeline.predict(pred_df) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kolhe\result_predict\src\pipeline\predict_pipeline.py", line 24, in predict raise CustomException(e,sys) src.exception.CustomException: Error occured in python script name [C:\Users\kolhe\result_predict\src\pipeline\predict_pipeline.py] line number [19] error message['OneHotEncoder' object has no attribute '_drop_idx_after_grouping'] [ 2024-03-23 21:25:17,425 ] 96 werkzeug - INFO - 127.0.0.1 - - [23/Mar/2024 21:25:17] "[35m[1mPOST /predictdata HTTP/1.1[0m" 500 -
i am not able to find the problem