facebook / facebook/prophet

Error when importing prophet

Open
#2,442 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
20.4k
Forks
4.6k
Avg merge
19h 52m
Merged PRs (30d)
1

Description

Full error code below

---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[1], line 27
24 from sklearn.metrics import classification_report
25 from sklearn.metrics import confusion_matrix
---> 27 from prophet import Prophet

File ~\AppData\Local\anaconda3\lib\site-packages\prophet\__init__.py:7
1 # Copyright (c) 2017-present, Facebook, Inc.
2 # All rights reserved.
3 #
4 # This source code is licensed under the BSD-style license found in the
5 # LICENSE file in the root directory of this source tree. An additional grant
6 # of patent rights can be found in the PATENTS file in the same directory.
----> 7 from prophet.forecaster import Prophet
9 from pathlib import Path
10 about = {}

File ~\AppData\Local\anaconda3\lib\site-packages\prophet\forecaster.py:19
16 import pandas as pd
17 from numpy.typing import NDArray
---> 19 from prophet.make_holidays import get_holiday_names, make_holidays_df
20 from prophet.models import StanBackendEnum
21 from prophet.plot import (plot, plot_components)

File ~\AppData\Local\anaconda3\lib\site-packages\prophet\make_holidays.py:14
11 import numpy as np
12 import pandas as pd
---> 14 import prophet.hdays as hdays_part2
15 import holidays as hdays_part1
18 def get_holiday_names(country):

File ~\AppData\Local\anaconda3\lib\site-packages\prophet\hdays.py:779
771 pass
774 # ------------ Holidays in Turkey---------------------
775 # This is now in Holidays, but with alias TR instead of the TU that we used.
776 # Include TU as an alias for backwards compatibility.
--> 779 class TU(Turkey):
780 pass
783 # ------------ Holidays in Pakistan---------------------

File ~\AppData\Local\anaconda3\lib\site-packages\holidays\registry.py:178, in EntityLoader.__init__(self, path, *args, **kwargs)
175 self.entity_name = entity_path[-1]
176 self.module_name = ".".join(entity_path[0:-1])
--> 178 super().__init__(*args, **kwargs)

TypeError: object.__init__() takes exactly one argument (the instance to initialize)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.