Script exit with no output
./venv/lib/python3.6/site-packages/sklearn/base.py:334: UserWarning: Trying to unpickle estimator KMeans from version 0.22.1 when using version 0.23.1. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
Traceback (most recent call last):
File "tgnews.py", line 109, in <module>
news_handle(input_filenames)
File "tgnews.py", line 51, in news_handle
print(dumps(n_c.predict_news(file_names_list)))
File "./clustering/news_type.py", line 80, in predict_news
clusters = self.cluster_predict(corpus[target_lang], target_lang)
File "./clustering/news_type.py", line 59, in cluster_predict
return self.cluster_algo_ru.predict(vectors)
File "./clustering/algos/k_mean_algo.py", line 18, in predict
return self.wrapped.predict(data)
File "./venv/lib/python3.6/site-packages/sklearn/cluster/_kmeans.py", line 1184, in predict
X = self._check_test_data(X)
File "./venv/lib/python3.6/site-packages/sklearn/cluster/_kmeans.py", line 929, in _check_test_data
order='C', accept_large_sparse=False)
File "./venv/lib/python3.6/site-packages/sklearn/utils/validation.py", line 73, in inner_f
return f(**kwargs)
File "./venv/lib/python3.6/site-packages/sklearn/utils/validation.py", line 624, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.