Giter VIP home page Giter VIP logo

pyjanssen's People

Contributors

laukei avatar

Stargazers

 avatar  avatar

Watchers

 avatar

pyjanssen's Issues

MCM() crashes if single class is shared over multiple threads

For example, if I have a thread monitoring the position and another thread moves the positioner, in about 50% of cases this happens:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\wx18969\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyjanssen\janssen_mcm.py", line 217, in move
    return self._move(address,channel,direction,kwargs)
  File "C:\Users\wx18969\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyjanssen\janssen_mcm.py", line 256, in _move
    str(self.step_size(address)),str(self.steps(address)))
  File "C:\Users\wx18969\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyjanssen\janssen_mcm.py", line 82, in _run
    return self.__parse_reply(response,i)
  File "C:\Users\wx18969\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyjanssen\janssen_mcm.py", line 102, in __parse_reply
    assert this_command_log['parameters'] == response.args
AssertionError
>>> Exception in thread Thread-359:
Traceback (most recent call last):
  File "C:\Users\wx18969\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 917, in _bootstrap_inner
    self.run()
  File "C:\Users\wx18969\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "<stdin>", line 3, in thing
  File "C:\Users\wx18969\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyjanssen\janssen_mcm.py", line 266, in get_position
    return self._run('POS',str(address),str(channel))['POS']
  File "C:\Users\wx18969\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyjanssen\janssen_mcm.py", line 82, in _run
    return self.__parse_reply(response,i)
  File "C:\Users\wx18969\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyjanssen\janssen_mcm.py", line 99, in __parse_reply
    this_command_log = self.__command_log.pop(i)
KeyError: 1

First thoughts are that this appears to be caused by MCM getting a response from one subprocess it expects in another, which causes it to find a mismatch between the expected response and the actual response.

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.