lneuhaus / pyrpl

pyrpl turns your RedPitaya into a powerful DSP device, especially suitable as a lockbox in quantum optics experiments.
http://lneuhaus.github.io/pyrpl/
MIT License
139 stars 109 forks source link

YAML loader bug in refactored version #89

Closed lneuhaus closed 7 years ago

lneuhaus commented 7 years ago

WARNING:pyrpl.memory:ruamel.yaml could not be found. Using yaml instead. Comments in config files will be lost. WARNING:pyrpl.memory:ruamel.yaml could not be found. Using yaml instead. Comments in config files will be lost.

AttributeError Traceback (most recent call last)

in () ----> 1 from pyrpl import Pyrpl C:\lneuhaus\github\pyrpl\pyrpl\__init__.py in () 15 from .attributes import * 16 from .curvedb import * ---> 17 from .pyrpl import * 18 19 def coucou(self, cava=9): C:\lneuhaus\github\pyrpl\pyrpl\pyrpl.py in () 30 31 from . import software_modules ---> 32 from .memory import MemoryTree 33 from .redpitaya import RedPitaya 34 from .pyrpl_utils import get_unique_name_list_from_class_list C:\lneuhaus\github\pyrpl\pyrpl\memory.py in () 58 59 # see http://stackoverflow.com/questions/13518819/avoid-references-in-pyyaml ---> 60 yaml.RoundTripDumper.ignore_aliases = lambda *args: True # NEVER TESTED 61 62 # ordered load and dump for yaml files. From AttributeError: 'module' object has no attribute 'RoundTripDumper'
lneuhaus commented 7 years ago

@ samuel: why did you add this line?

yaml.RoundTripDumper.ignore_aliases = lambda *args: True # NEVER TESTED

Maybe you could add a comment in the code?

lneuhaus commented 7 years ago

resolved for now, though comment is still missing