Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8504961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:11:05+00:00 2026-06-11T02:11:05+00:00

I am getting an Illegal characters in path error when doing chdir commands in

  • 0

I am getting an “Illegal characters in path” error when doing chdir commands in Iron Python. This is happening in run time with my code, but even in the Iron Python console it has this issue. I’m using the nt module because in code the os module does not work (appears to be a known issue).

Doing a little bit of playing around it turns out the “illegal characters” is actually the word bin. Below is the text from the console that shows me getting the error only when i navigate to the bin directory.

Here is the example

>>> nt.chdir('c:\Users\xxxxx\Documents\Visual Studio 2010\Projects\xxx')
>>> nt.chdir('c:\Users\xxxxx\Documents\Visual Studio 2010\Projects\xxx\Directory')
>>> nt.chdir('c:\Users\xxxxx\Documents\Visual Studio 2010\Projects\xxx\Directory\bin')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Illegal characters in path.

Whats worse is I’ll navigate to a totally different directory (that doesn’t even have a bin directory) and try to navigate to a subdirectory “bin” and i’ll still get that error!

Any Ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:11:06+00:00Added an answer on June 11, 2026 at 2:11 am

    The \ path separator is also a python escape character. Double them, or better yet, use r'' raw python literals instead:

    r'c:\Users\xxxxx\Documents\Visual Studio 2010\Projects\xxx'
    'c:\\Users\\xxxxx\\Documents\\Visual Studio 2010\\Projects\\xxx'
    

    For example, \n is a newline character, and \t is interpreted as a TAB. In your specific case, \b is interpreted as a backspace.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting an Illegal characters in path error while using XMLTextReader method. Basically, I'm
This is the error i'm getting when i try to run my application Illegal
I'm getting the error: Illegal characters in path. when trying to load XML, using
I am getting the error java:35: error: illegal character: \29, all this should do
AM getting continuously the illegal character error in this url : http://my.server.com/SelectPerson-0.1/nativeService/businessCardSave?company=Select Person&fullName=Rghh Dgivv&email=uday@uioperr.info&phoneNo=123456789&desiredPosition=Machine
I am getting illegal characters in the path by using the below codes: string
I'm getting an error: WARNING: Illegal character in path at index 25: file:/C:/Users/bkuhl/Java_Projects/CMT/build/web/WEB-INF/lib/antlr-2.7.6.jar I'm
I am getting the following error in RAD: java.net.URISyntaxException: Illegal character in path at
I am getting a javascript (prototype.js) error: Unexpected token ILLEGAL at this line of
I am getting illegal operand error when I run a program. The program where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.