Git Product home page Git Product logo

Comments (18)

Jey0707 avatar Jey0707 commented on June 12, 2024

File "C:\Python310\lib\site-packages\bas_remote\services\engine_service.py", line 99, in _extract_executable
await asyncio.wait(tasks, loop=self._loop)
TypeError: wait() got an unexpected keyword argument 'loop'
sys:1: RuntimeWarning: coroutine 'EngineService._extract_executable..task' was never awaited

First run ^

from bas-remote-python.

CheshireCaat avatar CheshireCaat commented on June 12, 2024

This package requires a python version higher than or equal to 3.7

from bas-remote-python.

Jey0707 avatar Jey0707 commented on June 12, 2024

Yes, I'm using Python 3.10.1

from bas-remote-python.

CheshireCaat avatar CheshireCaat commented on June 12, 2024

@VitoFarella, OK, sorry, I misread the version. Apparently, in versions above 3.8 there are breaking changes related to asyncio. I'll try to come up with something when I have time. For now, you can safely use it on versions 3.7 - 3.8.

from bas-remote-python.

CheshireCaat avatar CheshireCaat commented on June 12, 2024

@VitoFarella try version 1.2. If everything works correctly, please close the issue.

from bas-remote-python.

Jey0707 avatar Jey0707 commented on June 12, 2024

No problem!

Now after upgrade I have this error:

File "C:\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete
return future.result()
File "C:\Users\Farella Vito\Desktop\Nuova cartella\main.py", line 11, in main
await client.start()
File "C:\Python310\lib\site-packages\bas_remote\client.py", line 61, in start
await self._socket.start(port)
File "C:\Python310\lib\site-packages\bas_remote\services\socket_service.py", line 36, in start
self._socket = await connect(f'ws://127.0.0.1:{port}')
File "C:\Python310\lib\site-packages\websockets\legacy\client.py", line 622, in await_impl
transport, protocol = await self._create_connection()
File "C:\Python310\lib\asyncio\base_events.py", line 1080, in create_connection
transport, protocol = await self._create_connection_transport(
File "C:\Python310\lib\asyncio\base_events.py", line 1098, in _create_connection_transport
protocol = protocol_factory()
File "C:\Python310\lib\site-packages\websockets\legacy\client.py", line 160, in init
super().init(**kwargs)
File "C:\Python310\lib\site-packages\websockets\legacy\protocol.py", line 154, in init
self._drain_lock = asyncio.Lock(
File "C:\Python310\lib\asyncio\locks.py", line 77, in init
super().init(loop=loop)
File "C:\Python310\lib\asyncio\mixins.py", line 17, in init
raise TypeError(
TypeError: As of 3.10, the loop parameter was removed from Lock() since it is no longer necessary

^first run

from bas-remote-python.

CheshireCaat avatar CheshireCaat commented on June 12, 2024

@VitoFarella, right now I can't reproduce this problem using Python 3.10.4 and virtual environment. Please show your code (upload it to the sandbox or pastebin), try using a virtual environment if you're not already using it.

from bas-remote-python.

Jey0707 avatar Jey0707 commented on June 12, 2024

https://pastebin.com/qCU4ma2d

My code

from bas-remote-python.

CheshireCaat avatar CheshireCaat commented on June 12, 2024

Can't repeat the error, everything works correctly. Try reinstalling the package and dependencies, use a virtual environment.

from bas-remote-python.

Jey0707 avatar Jey0707 commented on June 12, 2024

I have tryied to reinstalling all, also updating python but I have always same error

from bas-remote-python.

Jey0707 avatar Jey0707 commented on June 12, 2024

I have also this error while running for second time:


Traceback (most recent call last):
  File "C:\Python310\lib\site-packages\bas_remote\services\socket_service.py", line 36, in start
    self._socket = await connect(f'ws://127.0.0.1:{port}')
  File "C:\Python310\lib\site-packages\websockets\legacy\client.py", line 622, in __await_impl__
    transport, protocol = await self._create_connection()
  File "C:\Python310\lib\asyncio\base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "C:\Python310\lib\asyncio\base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "C:\Python310\lib\asyncio\base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "C:\Python310\lib\asyncio\proactor_events.py", line 705, in sock_connect
    return await self._proactor.connect(sock, address)
  File "C:\Python310\lib\asyncio\windows_events.py", line 817, in _poll
    value = callback(transferred, key, ov)
  File "C:\Python310\lib\asyncio\windows_events.py", line 604, in finish_connect
    ov.getresult()
ConnectionRefusedError: [WinError 1225] Il computer remoto ha rifiutato la connessione di rete

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Farella Vito\Desktop\Test2\main.py", line 21, in <module>
    asyncio.run(main())
  File "C:\Python310\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete
    return future.result()
  File "C:\Users\Farella Vito\Desktop\Test2\main.py", line 10, in main
    await client.start()
  File "C:\Python310\lib\site-packages\bas_remote\client.py", line 61, in start
    await self._socket.start(port)
  File "C:\Python310\lib\site-packages\bas_remote\services\socket_service.py", line 39, in start
    raise SocketNotConnectedError()
bas_remote.errors.SocketNotConnectedError

from bas-remote-python.

CheshireCaat avatar CheshireCaat commented on June 12, 2024

I have also this error while running for second time

Try remove the data directory.

from bas-remote-python.

Jey0707 avatar Jey0707 commented on June 12, 2024

Removed, but when I retry after remove, i have this again

File "C:\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete
return future.result()
File "C:\Users\Farella Vito\Desktop\Nuova cartella\main.py", line 11, in main
await client.start()
File "C:\Python310\lib\site-packages\bas_remote\client.py", line 61, in start
await self._socket.start(port)
File "C:\Python310\lib\site-packages\bas_remote\services\socket_service.py", line 36, in start
self._socket = await connect(f'ws://127.0.0.1:{port}')
File "C:\Python310\lib\site-packages\websockets\legacy\client.py", line 622, in await_impl
transport, protocol = await self._create_connection()
File "C:\Python310\lib\asyncio\base_events.py", line 1080, in create_connection
transport, protocol = await self._create_connection_transport(
File "C:\Python310\lib\asyncio\base_events.py", line 1098, in _create_connection_transport
protocol = protocol_factory()
File "C:\Python310\lib\site-packages\websockets\legacy\client.py", line 160, in init
super().init(**kwargs)
File "C:\Python310\lib\site-packages\websockets\legacy\protocol.py", line 154, in init
self._drain_lock = asyncio.Lock(
File "C:\Python310\lib\asyncio\locks.py", line 77, in init
super().init(loop=loop)
File "C:\Python310\lib\asyncio\mixins.py", line 17, in init
raise TypeError(
TypeError: As of 3.10, the loop parameter was removed from Lock() since it is no longer necessary

from bas-remote-python.

CheshireCaat avatar CheshireCaat commented on June 12, 2024

Try version 1.3

from bas-remote-python.

Jey0707 avatar Jey0707 commented on June 12, 2024

With version 1.3 I have no more precedent errors but I have this new error:

result = await client.run_function('CheckIp')
bas_remote.errors.FunctionError: Timeout during creating new process

from bas-remote-python.

Jey0707 avatar Jey0707 commented on June 12, 2024

Worked, antivirus was bloking BAS, thank you so much

from bas-remote-python.

Jey0707 avatar Jey0707 commented on June 12, 2024

I have only a question:
when I tryed to start client in different function in a function other than the one where I start the bas function I got asyncio loop error.
I don’t understand how I could fix it, my idea was to start with only one client at the start of the application to reuse it when needed without creating a new one

from bas-remote-python.

CheshireCaat avatar CheshireCaat commented on June 12, 2024

@VitoFarella, it's best to use single client instance per application, because otherwise there may even be problems with the operation of the library as a whole - race-conditions etc. If you need to have multiple clients, at least specify different working folders.

Working with multiple clients without additional configuration has not been tested and may lead to errors. Also, please create separate issues for each individual problem, and only if it directly concerns the library.

from bas-remote-python.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.