- Questions
- Developer Jobs
- Tags
- Users
Join Stack Overflow to learn, share knowledge, and build your career.
TypeError: must be string without null bytes, not str
up vote
7down votefavorite
|
I'm trying to run this code, to run the same command (with little changes) with every frame that I have:
I run this and I get this error:
I searched in internet, but I can't find a good answer.
python null byte os.system
|
|||
add a comment
|
2 Answers
up vote
3down vote
|
The problem is with the \ char that should either be double escaped, i.e. changed to "\\" Or alternatively add an "r" before the string decleration: pml_cmd = r"pymol urei%s.pdb ..." You get this particular error since somewhere along the string there is a \0 which is interpreted as a NULL char |
|||
add a comment
|
up vote
0down vote
|
I was able to resolve this error by commenting out the
I could have done |
||
add a comment
|
Your Answer
Sign up or log in
Post as a guest
Name
Email
|
By posting your answer, you agree to the privacy policy and terms of service.
Not the answer you're looking for? Browse other questions tagged python null byte os.system or ask your own question.
STACK OVERFLOW
- Questions
- Jobs
- Developer Jobs Directory
- Salary Calculator
- Help
- Mobile
STACK OVERFLOW
BUSINESS
- Talent
- Ads
- Enterprise
COMPANY
- About
- Press
- Work Here
- Legal
- Privacy Policy
- Contact Us
STACK EXCHANGE
NETWORK
- Technology
- Life / Arts
- Culture / Recreation
- Science
- Other
- Blog
site design / logo © 2018 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required.rev 2018.2.7.28849