RPY2 does not remove Rtmp folders

Issue #68 open
Francesca Mazzoni created an issue

Although the content of those folders gets deleted, the folders themselves are not, so /tmp gets filled up with Rtmp* folders.

(Debian package: python-rpy2 Architecture: amd64 Version: 2.1.9-1)

Comments (14)

  1. Francesca Mazzoni reporter

    If I open R, it creates a Rtmp* folder, but when I close R, the folder is deleted. On the other hand, if I call R through rpy2, the folder is not deleted.

  2. Laurent Gautier

    Good catch. Custom cleanup was not interferring with the regular cleanup, it was just not called when the Python process exits without terminating R first.

    A more rigorous fix would work on the same principle, but would address this at the lower rpy2.rinterface level. I'll look into that.

  3. zakandrewking


    It looks to me like this fix never made it into the default branch. I am using 2.3.5 (from PyPI), and the Rtmp* directories are accumulating in my tmp folder.

  4. Laurent Gautier

    @zakandrewking : Yep, it seems that the patch did not make it somehow. I am not sure about what happened, but I am guessing that I wanted to fix this at the C-level (so both the rinterface and robjects levels are covered). I'll look at it.

  5. Leandro Hermida

    As of rpy2 3.1.0 this is still not fixed. In Linux if you run a script with the following single line:

    import rpy2.robjects as robjects

    In /tmp it creates an Rtmp* directory that doesn’t get cleaned up on exit.

  6. Laurent Gautier

    Issue tracking has moved to Github with the rest of the rpy2 project. Atlassian will disable mercurial projects on Bitbucket in about 1.5 months and delete them about 1.5 months later.

  7. Log in to comment