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

Empty result in REPL #1746

Closed
raphapassini opened this issue Aug 26, 2023 · 7 comments
Closed

Empty result in REPL #1746

raphapassini opened this issue Aug 26, 2023 · 7 comments
Assignees
Labels

Comments

@raphapassini
Copy link

The documentation says that I should have a value in the result variable after successful running a command, which does not holds True.

➜ pymodbus.console tcp --host 0.0.0.0 --port 5020

----------------------------------------------------------------------------
__________          _____             .___  __________              .__
\______   \___.__. /     \   ____   __| _/  \______   \ ____ ______ |  |
 |     ___<   |  |/  \ /  \ /  _ \ / __ |    |       _// __ \\\____ \|  |
 |    |    \___  /    Y    (  <_> ) /_/ |    |    |   \  ___/|  |_> >  |__
 |____|    / ____\____|__  /\____/\____ | /\ |____|_  /\___  >   __/|____/
           \/            \/            \/ \/        \/     \/|__|
                                        v1.3.0 - 3.4.1
----------------------------------------------------------------------------

> client.connect
true

> client.read_holding_registers count=2 address=4 slave=1
{
    "registers": [
        9,
        27177
    ]
}

> result.data
> result.raw
@janiversen
Copy link
Collaborator

janiversen commented Aug 26, 2023

@dhoomakethu you are the local specialist, any comments ?

@raphapassini which version of pymodbus are you using, on what system ?

@dhoomakethu
Copy link
Contributor

I will take a look the coming week, may be something has changed in the latest version. Thanks

@janiversen
Copy link
Collaborator

I just verified the problem on current dev, seems result is not assigned.

The result of the request is correctly shown in the display, but result is empty.

@janiversen
Copy link
Collaborator

you cannot run "result.decode" without parameters:

from documentation:

> result.decode word_order=little byte_order=little formatters=float64
28.17

>

dhoomakethu added a commit that referenced this issue Aug 26, 2023
@dhoomakethu
Copy link
Contributor

@raphapassini Please check in this branch repl-result-decoder

@dhoomakethu dhoomakethu self-assigned this Aug 26, 2023
@janiversen
Copy link
Collaborator

@dhoomakethu thanks that seems to solve the problem.

@janiversen
Copy link
Collaborator

Fixed on dev.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants