diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml index f8cb0dc..4d671d4 100644 --- a/.github/ISSUE_TEMPLATE/bug.yaml +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -27,7 +27,7 @@ body: attributes: label: Reproducible Example description: > - Please provide a minimal reproducible example, using generic (`ohlcv.csv`) data where applicable which demonstrates the current behaviour. The code should be complete and not require any further adjustments. + Please provide a minimal reproducible example, using generic (`ohlcv.csv`) data where applicable which demonstrates the current behaviour. The code should be complete and not require any further adjustments. DO NOT provide: Incomplete code, unnecessarily long code, code which requires access to a broker/API, or code which uses additional functions/classes/libraries. In almost ALL cases the example should not exceed 50 lines. placeholder: > from lightweight_charts import Chart... render: python diff --git a/lightweight_charts/abstract.py b/lightweight_charts/abstract.py index 53bee1b..9a02499 100644 --- a/lightweight_charts/abstract.py +++ b/lightweight_charts/abstract.py @@ -233,7 +233,7 @@ class SeriesCommon(Pane): series = self._series_datetime_format(series, exclude_lowercase=self.name) if self.name in series.index: series.rename({self.name: 'value'}, inplace=True) - if self._last_bar and series['time'] != self._last_bar['time']: + if self._last_bar is not None and series['time'] != self._last_bar['time']: self.data.loc[self.data.index[-1]] = self._last_bar self.data = pd.concat([self.data, series.to_frame().T], ignore_index=True) self._last_bar = series diff --git a/setup.py b/setup.py index 53e2954..33720d3 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open('README.md', 'r', encoding='utf-8') as f: setup( name='lightweight_charts', - version='1.0.18.3', + version='1.0.18.5', packages=find_packages(), python_requires='>=3.8', install_requires=[