nalepae / csv-plot

CSV Plot is a tool to easily plot any CSV file, of any size, without ever running out of memory.
https://nalepae.github.io/csv-plot/
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

example fails on new Linux Mint install #3

Open dalers opened 6 months ago

dalers commented 6 months ago

Hello, I found csv-plot searching for csv plotting utilities and installed locally on current Linux Mint 21.3 (i.e. did NOT use sudo with "pip install..."). I followed the first example (example_file.txt and configuration-1.yaml), which resulted in the following output (seems to be advisory, nothing actually says "error"), but I'm not seeing a graph.

Am I doing something wrong? Assistance would be greatfully appreciated, csv-plot appears to be exactly the tool I've been looking for!

Cheers, Dale

dale@firefly:~/Documents$ csv-plot ./example_file.txt -c ./configuration-1.yaml 
Process CSV file... Traceback (most recent call last):
  File "/home/dale/.local/bin/csv-plot", line 8, in <module>
    sys.exit(app())
  File "/home/dale/.local/lib/python3.10/site-packages/typer/main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "/home/dale/.local/lib/python3.10/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/dale/.local/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/dale/.local/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/dale/.local/lib/python3.10/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/dale/.local/lib/python3.10/site-packages/typer/main.py", line 497, in wrapper
    return callback(**use_params)  # type: ignore
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/entrypoint.py", line 279, in main
    pad_and_sample(csv_path, FILES_DIR, x, cpu_count())
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/csv/pad_and_sample.py", line 336, in pad_and_sample
    sample_sampled_to_the_end(nb_workers, dir_path, 1)
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/csv/pad_and_sample.py", line 283, in sample_sampled_to_the_end
    sample_sampled_to_the_end(nb_workers, sampled_global_dir, index + 1)
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/csv/pad_and_sample.py", line 283, in sample_sampled_to_the_end
    sample_sampled_to_the_end(nb_workers, sampled_global_dir, index + 1)
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/csv/pad_and_sample.py", line 283, in sample_sampled_to_the_end
    sample_sampled_to_the_end(nb_workers, sampled_global_dir, index + 1)
  [Previous line repeated 3 more times]
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/csv/pad_and_sample.py", line 262, in sample_sampled_to_the_end
    if are_files_fully_sampled(current_sampled_dir):
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/csv/pad_and_sample.py", line 79, in are_files_fully_sampled
    next(lines)
StopIteration
dale@firefly:~/Documents$ 
dale@firefly:~/Documents$ head ./example_file.txt 
index,sin,cos,sin_rand,cos_rand
0,0,1,-0.07456652762,1.039341379
1,0.06379051953,0.9990267284,0.122423516,1.098801076
2,0.1273332336,0.9941147013,0.1391795401,0.9790017212
3,0.1903813146,0.9852872507,0.2364198969,0.8756242061
4,0.2526898872,0.9725831611,0.3508306833,0.9489513789
5,0.3140169944,0.9560565163,0.3985702648,1.018873161
6,0.3741245527,0.9357764859,0.4404979239,0.8948342146
7,0.4327792916,0.9118270525,0.4145093978,0.9751999311
8,0.4897536741,0.88430668,0.4701196006,1.004694956
dale@firefly:~/Documents$ 
dale@firefly:~/Documents$ cat configuration-1.yaml 
general:
  variable: index

curves:
  - variable: sin

dale@firefly:~/Documents$ 
dalers commented 6 months ago

Fwiw, I found pyqtgraph failed when running the pyqtgraph.examples module per the pyqtgraph introduction doc page https://pyqtgraph.readthedocs.io/en/latest/getting_started/introduction.html (transcript below).

I then manually installed pyqtgraph as a system package (using the Linux Mint software manager), after which the pyqtgraph.examples module runs correctly (window open showing examples and examples run correctly). I then uninstalled and re-installed csv-plot (pip uninstall, pip install), but get the same ouput as before attempting to run the first csv-plot example.

Output trying to run pyqtgrph examples before manually installing pyqtgraph:

dale@firefly:~/Documents$ python3 -m pyqtgraph.examples
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: offscreen, eglfs, minimal, linuxfb, wayland, xcb, minimalegl, vkkhrdisplay, vnc, wayland-egl.

Aborted (core dumped)
dale@firefly:~/Documents$