Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

_rrule maximum recursion depth exceeded on multiprocessing usage #7852

Copy link
Copy link
Closed
@ahcub

Description

@ahcub
Issue body actions

To help us understand and resolve your issue, please fill out the form to the best of your ability. You can feel free to delete the sections that do not apply.

Bug report

  • A short 1-2 sentences that succinctly describes the bug

get function of multiprocessing.AsyncResult fails in case of plotting pandas.DataFrame with using non-UTC DatetimeIndex

Code for reproduction

  • A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required
from multiprocessing.pool import Pool
import pandas as pd
from matplotlib import pyplot as plt

def func(df):
    fig, ax = plt.subplots()
    df.plot(ax=ax)
    return 'title', fig

if __name__ == '__main__':
    index = pd.DatetimeIndex(pd.date_range('2016-10-05', periods=10, freq='T', tz='UTC'))
    index = index.tz_convert('America/Chicago')
    df = pd.DataFrame(list(range(10)), index=index, columns=['a'])
    with Pool(3) as pool:
        proc = pool.apply_async(func, (df,))
        title, fig = proc.get()
        fig.savefig(r'.\test.png')

Actual outcome

  • The output produced by the above code, which may be a screenshot, console output, etc.
Traceback (most recent call last):
  File "C:\miniconda\envs\p3\lib\threading.py", line 914, in _bootstrap_inner
    self.run()
  File "C:\miniconda\envs\p3\lib\threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "C:\miniconda\envs\p3\lib\multiprocessing\pool.py", line 429, in _handle_results
    task = get()
  File "C:\miniconda\envs\p3\lib\multiprocessing\connection.py", line 251, in recv
    return ForkingPickler.loads(buf.getbuffer())
  File "C:\miniconda\envs\p3\lib\site-packages\matplotlib\dates.py", line 730, in __getattr__
    return getattr(self._rrule, name)

  ...

  File "C:\miniconda\envs\p3\lib\site-packages\matplotlib\dates.py", line 730, in __getattr__
    return getattr(self._rrule, name)
RecursionError: maximum recursion depth exceeded

Expected outcome

  • A description of the expected outcome from the code snippet
  • If this used to work in an earlier version of Matplotlib, please note the version it used to work on

it should save a valid figure to the test.png

Matplotlib version

  • Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)
  • How did you install Matplotlib and Python (pip, anaconda, from source ...)

Matplotlib version:

matplotlib.version
'1.5.3'

Python version:
Python 3.5.2

Platform:
Windows

installed using mini-conda like:
conda install matplotlib

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.