Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Many thanks for your answer. you said "So you should fix your wc -c < "P1 lipids pos mode Processed Norm.ibd" command to make your code working.". But how? I am sorry, may you please elaborate it, if you have time, pelase? @milianbalazs Commented Feb 27, 2021 at 12:36
  • You should get the STDOUT/STDERR to solve the problem. Please change your current line to this: nbytes_str = subprocess.run(['wc -c < \"' + fname + '.ibd\"'], shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE) and print the STDOUT/STDERR with this: print(nbytes_byte.stderr, nbytes_byte.stdout). Then share with me the result and I will try to help you about solving! :) Commented Feb 27, 2021 at 12:50
  • First of all, I deeply thank you to try to help me. Then, it said nbytes_byte is not defined. Therefore, I changed it to nbytes_str and the output is b'The filename, directory name, or volume label syntax is incorrect.\r\n' b''@milanbalazs Commented Feb 27, 2021 at 13:57
  • I better to type all I did. nbytes_str = subprocess.run(['wc -c < \"' + fname + '.ibd\"'], shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE) print(nbytes_str.stderr, nbytes_str.stdout) nbytes = nbytes_str nbytes # number of bytes in the ibd file and the output is b'The filename, directory name, or volume label syntax is incorrect.\r\n' b'' CompletedProcess(args=['wc -c < "P1 lipids pos mode Processed Norm.ibd"'], returncode=1, stdout=b'', stderr=b'The filename, directory name, or volume label syntax is incorrect.\r\n') Commented Feb 27, 2021 at 13:59
  • 1
    Okay, this output is so helpful for debugging. I am 99% sure that the path of the IDB file is not correct. I have updated my answer how you should define the correct (full) path of the IDB file. Could you try that what I mention in my answer under the "EDIT:" section? Commented Feb 27, 2021 at 14:10