pyfttt icon indicating copy to clipboard operation
pyfttt copied to clipboard

Handling negative values

Open nevotens opened this issue 6 years ago • 1 comments

If any value starts with "-" (e.g. "-52,7", "-a") pyfttt fails.

Se below: Traceback (most recent call last): File "/home/pi/Documents/kutahaz.py", line 101, in temp, humi, temp_k]) File "/usr/lib/python3.5/subprocess.py", line 316, in check_output kwargs).stdout File "/usr/lib/python3.5/subprocess.py", line 398, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['pyfttt', '-k', '', '-e', '**', '19,5', '-52,7', '-a']' returned non-zero exit status 2

nevotens avatar Oct 29 '17 18:10 nevotens

Strange! I'll try this out in the next few days and get it fixed.

Edit: I encountered the same error. See https://stackoverflow.com/questions/9025204/python-argparse-issue-with-optional-arguments-which-are-negative-numbers.

briandconnelly avatar Oct 29 '17 22:10 briandconnelly