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

Move.load(f) issue in python 3.6 #229

Open
show0k opened this issue Feb 8, 2017 · 2 comments
Open

Move.load(f) issue in python 3.6 #229

show0k opened this issue Feb 8, 2017 · 2 comments
Labels

Comments

@show0k
Copy link
Member

show0k commented Feb 8, 2017

Spotted by @pierre-rouanet

import time

from pypot.creatures import PoppyErgoJr
from pypot.primitive.move import MoveRecorder, MovePlayer, Move


if __name__ == '__main__':
    jr = PoppyErgoJr(simulator='poppy-simu')

    mr = MoveRecorder(jr, 50, jr.motors)
    mr.start()
    time.sleep(1)
    mr.stop()

    with open('/tmp/bob.json', 'w') as f:
        mr.move.save(f)

    with open('/tmp/bob.json') as f:
        m = Move.load(f)

    # Fonctionne
    mp = MovePlayer(jr, mr.move)
    mp.start()
    mp.wait_to_stop()
    print('Everything ok')

    # Plante
    mp = MovePlayer(jr, m)
    mp.start()
    mp.wait_to_stop()
@show0k show0k added the bug label Feb 8, 2017
@jjehl
Copy link
Contributor

jjehl commented Feb 8, 2017

Only with 3.6 or with all 3.x ?
If I remenber well my issue was about playing a move with python 3 : #218

@show0k
Copy link
Member Author

show0k commented Feb 8, 2017

It is strange, yes it seems to be the same issue but I didn't get this issue for python other python 3 version.

show0k added a commit that referenced this issue Mar 14, 2017
show0k added a commit that referenced this issue Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants