Giter VIP home page Giter VIP logo

Comments (8)

jeffjiang0613 avatar jeffjiang0613 commented on August 17, 2024 1

I have ran into the same problem, the "get_handler" method has been removed in some old version and it will result in exception in new version of rf.
I have modified the wrapped_f method to fix it but the codes of robotframework is a bit complex for me, so I am not sure whether there will be any other issues.

def wrapped_f(q, *args, **kwargs): ''' Calls the decorated function and puts the result in a queue ''' try: context = EXECUTION_CONTEXTS.current runner = context.get_runner(keyword) ret = runner.run(Keyword(name=keyword, args=args), context) q.put(ret) except Exception as ex: print ex

from robotframework-async.

rlehfeld avatar rlehfeld commented on August 17, 2024 1

I think the implementation in robot framework changed. There is no longer a get_handler method.
I forked the library and did the necessary adaptations. Further I changed the implementation such that exceptions are handled. You can find my fork here:

https://github.com/rlehfeld/robotframework-async-keyword.git

from robotframework-async.

Chetic avatar Chetic commented on August 17, 2024

Is 3.0.2 the first incompatible version?
Is this true for newer versions as well?

from robotframework-async.

KenzK avatar KenzK commented on August 17, 2024

Looks like this issue is happening in ROBOT 3.0.4

robot.version
'3.0.4'

As a result, when I try running a simple script with "sleep", the execution hangs.
Python: 2.7.6

from robotframework-async.

KenzK avatar KenzK commented on August 17, 2024

Just debugged a bit further. Looks like the "get_handler" method has been removed from the robot.running.context lib.
There is "get_runner" method but it looks like this is for an entirely different purpose.

from robotframework-async.

Ka55i0peia avatar Ka55i0peia commented on August 17, 2024

@jeffjiang0613 provided here an in-comment fix/update to changed robotframework code. BUT, I think RF is not designed to run keyword's in threads (this way). The runner.run() method (write) accesses, data thus syncing techniques (like semaphores) might be required in RF to work for this lib.

A small snippet with that lib produces sometimes an error like this:

[ ERROR ] Reading XML source 'output.xml' failed: ParseError: mismatched tag: line 100, column 2

Watching file output.xml shows, that a writer in thread and a writer in main thread can write both a the same time in this resource.

from robotframework-async.

foxleoly avatar foxleoly commented on August 17, 2024

@jeffjiang0613 provided here an in-comment fix/update to changed robotframework code. BUT, I think RF is not designed to run keyword's in threads (this way). The runner.run() method (write) accesses, data thus syncing techniques (like semaphores) might be required in RF to work for this lib.

A small snippet with that lib produces sometimes an error like this:

[ ERROR ] Reading XML source 'output.xml' failed: ParseError: mismatched tag: line 100, column 2

Watching file output.xml shows, that a writer in thread and a writer in main thread can write both a the same time in this resource.

Yes,I met the issue.

from robotframework-async.

jeffjiang0613 avatar jeffjiang0613 commented on August 17, 2024

@jeffjiang0613 provided here an in-comment fix/update to changed robotframework code. BUT, I think RF is not designed to run keyword's in threads (this way). The runner.run() method (write) accesses, data thus syncing techniques (like semaphores) might be required in RF to work for this lib.
A small snippet with that lib produces sometimes an error like this:

[ ERROR ] Reading XML source 'output.xml' failed: ParseError: mismatched tag: line 100, column 2

Watching file output.xml shows, that a writer in thread and a writer in main thread can write both a the same time in this resource.

Yes,I met the issue.

It seems that robot framework does not support call keywords concurrently even though I use threads in python.

from robotframework-async.

Related Issues (8)

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.