#๐Ÿ”’ Getting error the file {out_file} does not exist after executing.

11 messages ยท Page 1 of 1 (latest)

quasi void
#

Getting error the file {out_file} does not exist after executing. Path is correct its working in normal script but not working when I converted to class and methods structure.
https://paste.pythondiscord.com/HMTA

proper pikeBOT
#

@quasi void

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

quasi void
inner tide
#

Always post errors as text. And, that suggests that some of the directories involved in that path do not exist. open won't create non-existent directories when writing.

quasi void
#

Ok sir please advise how can I modify the code

#

@inner tide please correct

inner tide
#

You can use os.mkdir to have it create all the directories in the path.

quasi void
#

But this os.mkdir i didn't use in normal script which i mentioned first in the link ..then how it is working fine don't know... but in conversation of class and methods only it's getting error. I tried os.mkdir but didn't work out.

proper pikeBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.