Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iotiel-sgrun simulator trace function is broken (never ported to python 3) #955

Open
timburke opened this issue Mar 6, 2020 · 0 comments
Labels
iotile-sensorgraph Related to iotile-sensorgraph package type:bug

Comments

@timburke
Copy link
Member

timburke commented Mar 6, 2020

See:

(env) PS C:\Arch\core\coretools\iotilesensorgraph> iotile-sgrun.exe C:\Users\TimBurke\Desktop\test.sgf -s 'run_time 1 minute' -t C:\Users\TimBurke\Desktop\trace.txt
Traceback (most recent call last):
  File "C:\Arch\core\workspace\env\Scripts\iotile-sgrun-script.py", line 11, in <module>
    load_entry_point('iotile-sensorgraph', 'console_scripts', 'iotile-sgrun')()
  File "c:\arch\core\coretools\iotilesensorgraph\iotile\sg\scripts\iotile_sgrun.py", line 194, in main
    sim.trace.save(args.trace)
  File "c:\arch\core\coretools\iotilesensorgraph\iotile\sg\sim\trace.py", line 52, in save
    json.dump(out, outfile, indent=4)
  File "C:\Python38\lib\json\__init__.py", line 180, in dump
    fp.write(chunk)
TypeError: a bytes-like object is required, not 'str'

The test.sgf was (but it shouldn't matter):

every 1 second
{
        call 0x8000 on controller => unbuffered 2;
        call 0x8002 on controller => unbuffered 2;
}

on value(unbuffered 2) == 5
{
        call 0x8001 on slot 1 => output 1;
}
@timburke timburke added type:bug iotile-sensorgraph Related to iotile-sensorgraph package labels Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iotile-sensorgraph Related to iotile-sensorgraph package type:bug
Projects
None yet
Development

No branches or pull requests

1 participant