#๐Ÿ”’ why cant i run my python file outside of a folder

22 messages ยท Page 1 of 1 (latest)

naive tangle
#

when i put my files outside of my folder in pycharm it gives me a runtime error but when i put the files back in the folder the script runs again how can i fix this?

naive fulcrumBOT
#

@naive tangle

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.

simple axle
#

are u putting your files into another folder?

naive tangle
#

nope

#

just inside the projects folder again

#

it was like this before

simple axle
#

so u have a project folder, and within that project folder u have another folder called DiscordBot

naive tangle
#

yes

simple axle
#

when u take your files out DiscordBot they stop working

naive tangle
#

exactly

simple axle
#

are u updating the directories within your files when u take them out

#

assuming they rely upon each other to work

naive tangle
#

i think it does that automaticly

#

its wierd cause it says that i cant run the discordbot.py because directory discord_bot doesnt exist but when i copy the path of the discordbot.py it says C:\Users\pinhe\pythonProject23\discordbot.py

#

never mind fixed it make a new project

#

and put the files there

#

now it works

#

!solved

naive fulcrumBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.