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

Connection Failed: TypeError: not all arguments converted during string formatting #79

Open
rmcastelao opened this issue Jun 12, 2024 · 0 comments

Comments

@rmcastelao
Copy link

After installation and configuration using HTTP, I get a successful connection but no data is being fetched. Seems to be a parsing error:

--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.12/logging/__init__.py", line 1160, in emit
    msg = self.format(record)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/logging/__init__.py", line 999, in format
    return fmt.format(record)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/logging/__init__.py", line 703, in format
    record.message = record.getMessage()
                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/logging/__init__.py", line 392, in getMessage
    msg = msg % self.args
          ~~~~^~~~~~~~~~~
TypeError: not all arguments converted during string formatting
Call stack:
  File "/sungather.py", line 596, in <module>
    main()
  File "/sungather.py", line 530, in main
    if not inverter.checkConnection():
  File "/sungather.py", line 80, in checkConnection
    return self.connect()
  File "/sungather.py", line 63, in connect
    try: self.client.connect()
  File "/usr/lib/python3.12/site-packages/SungrowModbusWebClient/SungrowModbusWebClient.py", line 101, in connect
    logging.warning("Connection Failed", payload_dict['result_msg'] )
Message: 'Connection Failed'
Arguments: ('I18N_COMMON_INTER_ABNORMAL',)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.12/logging/__init__.py", line 1160, in emit
    msg = self.format(record)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/logging/__init__.py", line 999, in format
    return fmt.format(record)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/logging/__init__.py", line 703, in format
    record.message = record.getMessage()
                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/logging/__init__.py", line 392, in getMessage
    msg = msg % self.args
          ~~~~^~~~~~~~~~~
TypeError: not all arguments converted during string formatting
Call stack:
  File "/sungather.py", line 596, in <module>
    main()
  File "/sungather.py", line 530, in main
    if not inverter.checkConnection():
  File "/sungather.py", line 80, in checkConnection
    return self.connect()
  File "/sungather.py", line 63, in connect
    try: self.client.connect()
  File "/usr/lib/python3.12/site-packages/SungrowModbusWebClient/SungrowModbusWebClient.py", line 101, in connect
    logging.warning("Connection Failed", payload_dict['result_msg'] )
Message: 'Connection Failed'
Arguments: ('I18N_COMMON_INTER_ABNORMAL',)
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