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

does not work properly when opened using subprocess.call(), subprocess.run() or similar commands in python script #101

Open
tb-dhk opened this issue Oct 18, 2022 · 0 comments

Comments

@tb-dhk
Copy link

tb-dhk commented Oct 18, 2022

whenever i use subprocess.call(['termgraph', 'stats.dat']) or other similar commands in a python script, i always get this error:

Traceback (most recent call last):
  File "/home/user/.local/bin/termgraph", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.10/site-packages/termgraph/termgraph.py", line 133, in main
    _, labels, data, colors = read_data(args)
  File "/home/user/.local/lib/python3.10/site-packages/termgraph/termgraph.py", line 712, in read_data
    colors = check_data(labels, data, args)
  File "/home/user/.local/lib/python3.10/site-packages/termgraph/termgraph.py", line 569, in check_data
    len_categories = len(data[0])
IndexError: list index out of range

however, these commands work outside python scripts like in the python shell or just the command line. is there any way i can allow them to run in python scripts as well?

@tb-dhk tb-dhk changed the title does not work properly when opened using subprocess.call(), subprocess.run() or similar commands does not work properly when opened using subprocess.call(), subprocess.run() or similar commands in python script Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant