Closed Depech101 closed 1 year ago
I just lern how to add filters or configure them. Thnk you for your feedback.
@Depech101 I looked at your screenshot again and found the arduplot code is copied under monitor/arduplot.
The actual location you need to copy is monitor like this.
Thank You for Your fast reaction!
But unfortunaly after moving files to folder is You said i got this:
--- serial_plotter is starting
Error: Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\platformio__main.py", line 102, in main
cli() # pylint: disable=no-value-for-parameter
^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\platformio\cli.py", line 70, in invoke
return super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 760, in invoke
return callback(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\platformio\device\monitor\command.py", line 152, in device_monitor_cmd
start_terminal(options)
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\platformio\device\monitor\terminal.py", line 54, in start_terminal
term = new_terminal(options)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\platformio\device\monitor\terminal.py", line 102, in new_terminal
term = Terminal(
^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\platformio\device\monitor\terminal.py", line 28, in init
super().init(args, **kwargs)
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\serial\tools\miniterm.py", line 403, in init
self.update_transformations()
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\serial\tools\miniterm.py", line 456, in update_transformations
self.tx_transformations = [t() for t in transformations]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\serial\tools\miniterm.py", line 456, in
============================================================
An unexpected error occurred. Further steps:
Verify that you have the latest version of PlatformIO using
pip install -U platformio
command
Try to find answer in FAQ Troubleshooting section https://docs.platformio.org/page/faq/index.html
Report this problem to the developers https://github.com/platformio/platformio-core/issues
============================================================
Hmm, I noticed Python 10 introduced some change that break some backward compatibility on other projects and this may be the case. It may take some time for me to work on this version migration. Meanwhile, could you run on the Python3.9?
@Depech101 I installed the VSCode and PIO fresh to plan my time to work on this issue, and concluded the arduplot is working fine even with the new Python11. So fortunately the the change is not affecting the arduplot.
And looking through your reply, I found you're running the Windows default Python not the PIO bundled Python. If you want to run the arduplot with the Windows default Python, then you need to install arduplot to that environment as well.
I guess you already know, but just to document, PIO uses a virtual Python environment. And you had installed the arduplot on to this venv.
Would you check this and let me know? Thanks.
Ok, i will do it, and I truly value your involvement! But I need to understand this things about env and so on. As variant You can have access to my computer trough AnyDesk app.
Or give me a link for pio and stuff I will try understand with help of chatGPT it worth nothing)
It looks like you have more than two Python versions on your PC, for example, Python 3.11 installed on the Windows system wise, and Python3.9 under ~/.platformio/penv/bin for PIO(PlatformIO). Your first posting on this issue showed you installed the arduplot on the Python3.9 environment.
So you need to open the Terminal from the VSCode project and run it. i.e. pio device monitor -f plotter
Or open a Command Prompt from Windows start menu, install arduplot again to Python 3.11 system wise environment, and run arduplot.
Additional info:
Microsoft Windows [Version 10.0.19044.2965] (c) Microsoft Corporation. All rights reserved.
C:\Users\user>cd C:\Users\user\Documents\PLATFORMIO\PROJECTS\Termorelay
C:\Users\user\Documents\PLATFORMIO\PROJECTS\Termorelay>pio device monitor -f plotter
--- serial_plotter is starting
Error: Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\platformio__main.py", line 102, in main
cli() # pylint: disable=no-value-for-parameter
^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\platformio\cli.py", line 70, in invoke
return super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 760, in invoke
return callback(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\platformio\device\monitor\command.py", line 152, in device_monitor_cmd
start_terminal(options)
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\platformio\device\monitor\terminal.py", line 54, in start_terminal
term = new_terminal(options)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\platformio\device\monitor\terminal.py", line 102, in new_terminal
term = Terminal(
^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\platformio\device\monitor\terminal.py", line 28, in init
super().init(args, **kwargs)
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\serial\tools\miniterm.py", line 403, in init
self.update_transformations()
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\serial\tools\miniterm.py", line 456, in update_transformations
self.tx_transformations = [t() for t in transformations]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\serial\tools\miniterm.py", line 456, in
============================================================
An unexpected error occurred. Further steps:
Verify that you have the latest version of PlatformIO using
pip install -U platformio
command
Try to find answer in FAQ Troubleshooting section https://docs.platformio.org/page/faq/index.html
Report this problem to the developers https://github.com/platformio/platformio-core/issues
============================================================
C:\Users\user\Documents\PLATFORMIO\PROJECTS\Termorelay>
When you see the log, you find the following string. "C:\Users\user\AppData\Local\Programs\Python\Python311\"
And "Python311" in that string means it's running Python 3.11 that is outside of PIO. The latest PIO uses Python 3.9 for now.
Yeah! Sounds magic)) I will try later
Got this: Executing task: C:\Users\user\AppData\Local\Programs\Python\Python311\Scripts\platformio.exe device monitor How can I change it to Python3.9?
In order to use the PIO bundled Python, you need to open the terminal from the VSCode with the Project open. That is
Then, you can run either arduplot or pio device monitor -f plotter
And if you want to know which version of Python you're running, just type pip -V
, then you will see the actual pip that matches the Python
Hope this helps.
Thank you! Here what i got:
@Depech101 Close the terminal, and open a terminal again with the VSCode status bar icon and see if it change.
The proper one should look like
C:\User\user\.platformio\penv\lib\python3.9\site-packages\pip (python 3.9)
Otherwise please take a look at the PIO document and reinstall VSCode and PIO.
PS C:\Users\user\Documents\PlatformIO\Projects\Termorelay> py -0p
-V:3.11 * C:\Users\user\AppData\Local\Programs\Python\Python311\python.exe
-V:3.10 C:\Users\user\AppData\Local\Programs\Python\Python310\python.exe
-V:3.9 C:\Users\user\AppData\Local\Programs\Python\Python39\python.exe
Close the terminal, and open a terminal again with the VSCode status bar icon and see if it change. why should it change if I didn't changed it?
The proper one should look like C:\User\user.platformio\penv\lib\python3.9\site-packages\pip (python 3.9)
Otherwise please take a look at the PIO document and reinstall VSCode and PIO.
Please refer to the documentation of a python and the PIO.
Oh thank you, I will
I use: PlatformIO Core, version 6.1.7 Did this: Windows usage with Version Core 6.1.5·Home 3.4.3 In Gui go to PLatforIO sidebar -> Select New Terminal in quick access at the bottom In the Terminal window run the following -> pip install arduplot Close the terminal or type exit
Edit the platform.ini file (with VS or your preference) add or ammend (add ,plotter if the entry line already exists) plotter to the monitor filter flag -> monitor_filters = plotter Got this: Executing task: C:\Users\user\AppData\Local\Programs\Python\Python311\Scripts\platformio.exe device monitor
Warning! Skipping unknown filters
plotter
. Known filters arecolorize, debug, default, direct, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- Terminal on COM7 | 115200 8-N-1 --- Available filters and text transformations: colorize, debug, default, direct, hexlify, log2file, nocontrol, printable, send_on_enter, time --- More details at https://bit.ly/pio-monitor-filters --- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H added folder monitor to my project folder: