ni / niflexlogger-automation-python

The niflexlogger-automation package contains an API (Application Programming Interface) and examples for using Python to automate NI FlexLogger. The automation API supports modifying the configuration of existing FlexLogger projects and controlling the execution of FlexLogger test sessions. The package is implemented in Python. NI created and supports this package.
MIT License
8 stars 6 forks source link

Automation in PyCharm #39

Open strykereye2 opened 7 months ago

strykereye2 commented 7 months ago

When trying to run any of the examples you have supplied such as Test Sequencer. I have encountered an issue with the importlib. I was doing a little googling and discovered that importlib became a package from the standard library and I don't need to install it separately

I was trying to get by doing an: python3 -c "import importlib"

I have also encountered a numpy module issue,

I'm trying to build a Automatic sequence generator for a common test CRIO Configuration. I need to build by setting Common Channel Naming Conventions so that a Flexlogger Plugin I'm building can perform some custom calculations and trends as a repeatable test platform with minor operator configuration changes.

As the developers, I wanted to thank you but also ask you what is your development environment like are you operating from command line with python and pip or are you working inside an IDE like PyCharm like I am?

I would like to duplicate your working environment or try and get your current code operation from within PyCharm. NOTE I have less than 8months working in Python. so I will apologize in advance for my limitations.

My Environment is as follows: PyCharm 2023.1.2 Community Edition Runtime 17.0.6+10-b829.9 Python 3.10.4 pip 23.3.2

Error Encountered: _Collecting importlib Using cached importlib-1.0.4.zip (7.1 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'error'

error: subprocess-exited-with-error

python setup.py egg_info did not run successfully. exit code: 1

[1 lines of output] ERROR: Can not execute setup.py since setuptools is not available in the build environment. [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

Encountered error while generating package metadata._

And

C:\Users\Admin\PycharmProjects\FlexloggerAutomatedTestSetup\venv\Scripts\python.exe "C:\Users\Admin\PycharmProjects\FlexloggerAutomatedTestSetup\examples\Test Sequencer\thermal chamber with hardware\sequencer_thermal_chamber_hardware.py" Traceback (most recent call last): File "C:\Users\Admin\PycharmProjects\FlexloggerAutomatedTestSetup\examples\Test Sequencer\thermal chamber with hardware\sequencer_thermal_chamber_hardware.py", line 5, in import numpy as np ModuleNotFoundError: No module named 'numpy'

Process finished with exit code 1

NIbbuchanan commented 3 months ago

For some reason our automated notification process isn't working for git opened issues, so I just noticed this today. Let us know if this is still a problem of if you were able to figure out the issue. Thanks and sorry for the long delay (our normal support channels are more reliable/timely than the git notifications...sorry about that!)

strykereye2 commented 1 month ago

Did you guys make any progress on this?

I would like to tie in since I'm working to build some Flex Centric solutions.

Thanks,

Billy G. Alexander

On Thu, Jun 6, 2024 at 9:29 AM NIbbuchanan @.***> wrote:

For some reason our automated notification process isn't working, so I just noticed this today. We will begin investing this ASAP. Thanks for the feedback.

— Reply to this email directly, view it on GitHub https://github.com/ni/niflexlogger-automation-python/issues/39#issuecomment-2152685757, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANFLCMCD5GOIF2ZTTBDD5H3ZGBW4NAVCNFSM6AAAAABI43REHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJSGY4DKNZVG4 . You are receiving this because you authored the thread.Message ID: @.***>

NIbbuchanan commented 1 month ago

Is this still an issue for you? We had someone who wasn't too familiar with PyCharm/python try it out using the documented steps. They were able to get it to work, and they provided some more details specific to PyCharm in the Getting started README: https://niflexlogger-automation.readthedocs.io/en/latest/getting_started.html#installing-the-flexlogger-automation-python-module-in-pycharm

Let us know if you still have any issues. Thanks for letting us know about this and following up to make sure we updated the documentation. Brad

strykereye2 commented 1 month ago

I haven't tried to use it in quite some time. I will go through that link and attempt to use it and provide feedback.

I am working with a base template Project with Several Re-Usable Screens and then kickoff a New Job with new customer/ part numbers/ serial number/ test specifications etc. which would be pre populated from the Interactive Test Setup Program i created in labview. I initially was going to do this in Python as an exercise to improve my python knowledge which is quite poor... these .flxcfg and .flxscr in the project now include CRC's which may or may not be causing errors with the latest flex version. I'm just now getting back onto this project and if nothing else I would like to understand how to use the python even if it stick with the Labview Re Usable Job Program I created.

Thanks,

Billy

On Thu, Jul 25, 2024 at 2:57 PM NIbbuchanan @.***> wrote:

Is this still an issue for you? We had someone who wasn't too familiar with PyCharm/python try it out using the documented steps. They were able to get it to work, and they provided some more details specific to PyCharm in the Getting started README:

https://niflexlogger-automation.readthedocs.io/en/latest/getting_started.html#installing-the-flexlogger-automation-python-module-in-pycharm

Let us know if you still have any issues. Thanks for letting us know about this and following up to make sure we updated the documentation. Brad

— Reply to this email directly, view it on GitHub https://github.com/ni/niflexlogger-automation-python/issues/39#issuecomment-2251292788, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANFLCMG3DP42UGMQDA5MBM3ZOFKCNAVCNFSM6AAAAABI43REHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJRGI4TENZYHA . You are receiving this because you authored the thread.Message ID: @.***>