This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jerpint
Recipients jerpint
Date 2021-02-14.05:28:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In fact, the issue seems to be coming from open() itself when opening a non-existent directory in write mode:

[nav] In [1]: import os
         ...: nonexixstent_dir = 'not_a_dir/'
         ...: assert not os.path.exists(nonexixstent_dir)
         ...: with open(nonexixstent_dir, 'wb') as fdst:
         ...:     pass
IsADirectoryError                         Traceback (most recent call last)
<ipython-input-1-73d4010d6f34> in <module>
      2 dir_path = 'not_a_dir/'
      3 assert not os.path.exists(nonexixstent_dir)
----> 4 with open(nonexixstent_dir, 'wb') as fdst:
      5     pass

IsADirectoryError: [Errno 21] Is a directory: 'not_a_dir/'
Date User Action Args
2021-02-14 05:28:45jerpintsetrecipients: + jerpint
2021-02-14 05:28:45jerpintsetmessageid: <>
2021-02-14 05:28:45jerpintlinkissue43219 messages
2021-02-14 05:28:45jerpintcreate