Python Forum
CWD (Current working directory)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CWD (Current working directory)
#3
os.chdir(os.path.dirname(__file__))
results in the follinging error:
[WinError 123] The filename, directory name, or volume label syntax is incorrect: ''
the file name is 'page_00_index.py'
The directory is 'D:\software\Python\python_excel\python_openpyxl_dcflog_updated-2018-11-08'

I'm trying to track down why this is now.
Thanks,
Phil
Reply


Messages In This Thread
CWD (Current working directory) - by pcsailor - Nov-09-2018, 01:33 AM
RE: CWD (Current working directory) - by Larz60+ - Nov-09-2018, 01:55 AM
RE: CWD (Current working directory) - by pcsailor - Nov-09-2018, 06:19 AM
RE: CWD (Current working directory) - by Larz60+ - Nov-09-2018, 10:37 AM
RE: CWD (Current working directory) - by pcsailor - Nov-11-2018, 09:56 AM
RE: CWD (Current working directory) - by Larz60+ - Nov-11-2018, 10:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  working directory if using windows path-variable chitarup 2 837 Nov-28-2023, 11:36 PM
Last Post: chitarup
  Get Current Directory From ShortCut. Oshadha 1 1,033 Jul-30-2022, 04:41 PM
Last Post: snippsat
  Setup working directory in IDLE Pavel_47 3 3,892 Mar-06-2021, 08:59 AM
Last Post: Pavel_47
  Stock Rate of Change (based on open and current price) Not Working firebird 1 2,432 Jul-29-2019, 07:10 AM
Last Post: perfringo
  portable way to get current directory Skaperen 5 3,299 Jun-12-2019, 01:16 PM
Last Post: Skaperen
  setting working directory in pycharm saisankalpj 10 13,422 Dec-06-2018, 07:58 PM
Last Post: snippsat
  current directory issue saisankalpj 1 2,466 Nov-12-2018, 12:06 PM
Last Post: buran
  how to save python file to working directory rpdohm 3 6,125 Sep-14-2017, 06:16 PM
Last Post: rpdohm
  Importing module from outside of the current directory Annie 4 4,699 Mar-21-2017, 11:13 PM
Last Post: Annie

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020