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

inverter_scan.py PermissonError: Permission denied #334

Open
joysfera opened this issue Dec 7, 2024 · 0 comments
Open

inverter_scan.py PermissonError: Permission denied #334

joysfera opened this issue Dec 7, 2024 · 0 comments

Comments

@joysfera
Copy link

joysfera commented Dec 7, 2024

Hi there,

when I run the inverter_scan.py I get Permission denied. Tried running it also under root - didn't help. Tried modifying the broadcast IP address from 255.255.255.255 to 192.168.1.255 (my LAN is 192.168.1.0/24) - didn't help either. Any idea how to get the scanning working, please?

Oh, the OS is Debian based (DietPi v9.8).

$ python inverter_scan.py
Traceback (most recent call last):
  File "/home/user/inverter_scan.py", line 13, in <module>
    result = asyncio.run(goodwe.search_inverters()).decode("utf-8").split(",")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/user/vp/lib/python3.11/site-packages/goodwe/__init__.py", line 127, in search_inverters
    result = await command.execute(UdpInverterProtocol("255.255.255.255", 48899, 1, 0))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/vp/lib/python3.11/site-packages/goodwe/protocol.py", line 456, in execute
    response_future = await protocol.send_request(self)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/vp/lib/python3.11/site-packages/goodwe/protocol.py", line 182, in send_request
    await self._connect()
  File "/home/user/vp/lib/python3.11/site-packages/goodwe/protocol.py", line 124, in _connect
    self._transport, self.protocol = await asyncio.get_running_loop().create_datagram_endpoint(
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 1386, in create_datagram_endpoint
    raise exceptions[0]
  File "/usr/lib/python3.11/asyncio/base_events.py", line 1373, in create_datagram_endpoint
    await self.sock_connect(sock, remote_address)
  File "/usr/lib/python3.11/asyncio/selector_events.py", line 634, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/selector_events.py", line 642, in _sock_connect
    sock.connect(address)
PermissionError: [Errno 13] Permission denied

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