← Back to team overview

sikuli-driver team mailing list archive

[Bug 1573519] [NEW] [1.1.0] run(): missing part of command line output

 

Public bug reported:

------------- more information from related question

same behaviour here on attempts with ffmpeg insteat of sox here. The used cmdline with that is:
query = 'ffmpeg.exe -i "T002.wav" -af volumedetect -f null null.wav'

-> result: Only the first line of the output is returned to sikulix/the
script.

FYI: If on the windows shell the output pipe (in Windows ">" or ">>") is
used for that, the output file is always empty. Maybe this helps for
debugging.

> The following would be helpful:
> run on commandline:
> sox.exe "a.wav" -n stat 1>logOut.txt 2>logError.txt

The logOut.txt has a size of 0byte and the logError.txt contains the
needed lines of output i needed.

The workaround with subprocess seems to be working fine with:

query = 'f:\\...\\ffmpeg.exe -i "f:\...\T002.wav" -af volumedetect -f null foo.wav'
proc = subprocess.Popen(query, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1)
print proc.communicate()

--------------------------------------------------------------------------

I want to use the program sox for volume statistics of Audiofiles and do on Windows:
f:>sox.exe "a.wav" -n stat
and get:
Samples read:            630784
Length (seconds):      2.972154
Scaled by:         2147483647.0
Maximum amplitude:     0.000153
Minimum amplitude:    -0.000153
Midline amplitude:     0.000000
Mean    norm:          0.000025
..and many more lines.

but in Sikulix with:

cmdout = run( soxPath + '  "f:\\<myfolder>\\a.wav" -n stat' )
print cmdout

i just get:

[info] runcmd: f:\<myfolfder>\sox.exe f:\<myfolder>\a.wav -n stat
0
*****error*****
Samples read: 630784

My question is, what kind of error occur and where are the remaning
lines of the output?

PS: If the commands are put into a *.bat file and be called via run()
the commandline breakes on a underscore (_) in the *.bat file path.

** Affects: sikuli
     Importance: High
     Assignee: RaiMan (raimund-hocke)
         Status: In Progress

** Description changed:

+ ------------- more information from related question
+ 
+ same behaviour here on attempts with ffmpeg insteat of sox here. The used cmdline with that is:
+ query = 'ffmpeg.exe -i "T002.wav" -af volumedetect -f null null.wav'
+ 
+ -> result: Only the first line of the output is returned to sikulix/the
+ script.
+ 
+ FYI: If on the windows shell the output pipe (in Windows ">" or ">>") is
+ used for that, the output file is always empty. Maybe this helps for
+ debugging.
+ 
+ > The following would be helpful:
+ > run on commandline:
+ > sox.exe "a.wav" -n stat 1>logOut.txt 2>logError.txt
+ 
+ The logOut.txt has a size of 0byte and the logError.txt contains the
+ needed lines of output i needed.
+ 
+ The workaround with subprocess seems to be working fine with:
+ 
+ query = 'f:\\...\\ffmpeg.exe -i "f:\...\T002.wav" -af volumedetect -f null foo.wav'
+ proc = subprocess.Popen(query, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1)
+ print proc.communicate()
+ 
+ --------------------------------------------------------------------------
+ 
  I want to use the program sox for volume statistics of Audiofiles and do on Windows:
  f:>sox.exe "a.wav" -n stat
- and get: 
- Samples read:            630784 
+ and get:
+ Samples read:            630784
  Length (seconds):      2.972154
  Scaled by:         2147483647.0
  Maximum amplitude:     0.000153
  Minimum amplitude:    -0.000153
  Midline amplitude:     0.000000
  Mean    norm:          0.000025
  ..and many more lines.
  
  but in Sikulix with:
  
  cmdout = run( soxPath + '  "f:\\<myfolder>\\a.wav" -n stat' )
  print cmdout
  
  i just get:
  
- [info] runcmd: f:\<myfolfder>\sox.exe f:\<myfolder>\a.wav -n stat 
- 0 
- *****error***** 
- Samples read: 630784 
+ [info] runcmd: f:\<myfolfder>\sox.exe f:\<myfolder>\a.wav -n stat
+ 0
+ *****error*****
+ Samples read: 630784
  
+ My question is, what kind of error occur and where are the remaning
+ lines of the output?
  
- My question is, what kind of error occur and where are the remaning lines of the output?
- 
- 
- PS: If the commands are put into a *.bat file and be called via run() the commandline breakes on a underscore (_) in the *.bat file path.
+ PS: If the commands are put into a *.bat file and be called via run()
+ the commandline breakes on a underscore (_) in the *.bat file path.

** Changed in: sikuli
       Status: New => In Progress

** Changed in: sikuli
   Importance: Undecided => High

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => 1.1.1

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1573519

Title:
  [1.1.0] run(): missing part of command line output

Status in Sikuli:
  In Progress

Bug description:
  ------------- more information from related question

  same behaviour here on attempts with ffmpeg insteat of sox here. The used cmdline with that is:
  query = 'ffmpeg.exe -i "T002.wav" -af volumedetect -f null null.wav'

  -> result: Only the first line of the output is returned to
  sikulix/the script.

  FYI: If on the windows shell the output pipe (in Windows ">" or ">>")
  is used for that, the output file is always empty. Maybe this helps
  for debugging.

  > The following would be helpful:
  > run on commandline:
  > sox.exe "a.wav" -n stat 1>logOut.txt 2>logError.txt

  The logOut.txt has a size of 0byte and the logError.txt contains the
  needed lines of output i needed.

  The workaround with subprocess seems to be working fine with:

  query = 'f:\\...\\ffmpeg.exe -i "f:\...\T002.wav" -af volumedetect -f null foo.wav'
  proc = subprocess.Popen(query, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1)
  print proc.communicate()

  --------------------------------------------------------------------------

  I want to use the program sox for volume statistics of Audiofiles and do on Windows:
  f:>sox.exe "a.wav" -n stat
  and get:
  Samples read:            630784
  Length (seconds):      2.972154
  Scaled by:         2147483647.0
  Maximum amplitude:     0.000153
  Minimum amplitude:    -0.000153
  Midline amplitude:     0.000000
  Mean    norm:          0.000025
  ..and many more lines.

  but in Sikulix with:

  cmdout = run( soxPath + '  "f:\\<myfolder>\\a.wav" -n stat' )
  print cmdout

  i just get:

  [info] runcmd: f:\<myfolfder>\sox.exe f:\<myfolder>\a.wav -n stat
  0
  *****error*****
  Samples read: 630784

  My question is, what kind of error occur and where are the remaning
  lines of the output?

  PS: If the commands are put into a *.bat file and be called via run()
  the commandline breakes on a underscore (_) in the *.bat file path.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1573519/+subscriptions


Follow ups