On Wed, Sep 13, 2017 at 5:39 PM, Sean DiZazzo <sean.diza...@gmail.com> wrote:
> On Wednesday, September 13, 2017 at 12:06:20 PM UTC-7, larry....@gmail.com 
> wrote:
>> I have a script that creates a tmp dir, create a lot of files in it,
>> and when done, does a rmtree on the dir. When it does that I get this
>> message:
>>
>> shell-init: error retrieving current directory: getcwd: cannot access
>> parent directories: No such file or directory
>>
>> But no exception is thrown. How can I determine why I get this message?
>
> I usually see that message when I am in a directory in the shell but it has 
> already been deleted by another process.
>
> Make sure the directory exists.  Is another part of your script deleting the 
> root directory while rmtree is running?  Or something of the like.

Turned out the script's cwd was in a dir that was being removed. I
chdir'ed out of there and that resolved the issue.

Thanks to all who responded.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to