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

MicroDrop fails at launch when reading profile data file #229

Open
ryanfobel opened this issue Jun 9, 2017 · 0 comments
Open

MicroDrop fails at launch when reading profile data file #229

ryanfobel opened this issue Jun 9, 2017 · 0 comments

Comments

@ryanfobel
Copy link
Contributor

Here's the traceback:

(C:\Users\automation\MicroDrop-v2.0\envs\Microdrop-v1.0) C:\Users\automation\MicroDrop-v2.0\envs\Microdrop-v1.0\Lib\site-packages\microdrop_launcher\bin>python -m microdrop_launcher.bin.profile_launcher
No handlers could be found for logger "mpm.commands"
Traceback (most recent call last):
  File "C:\Users\automation\MicroDrop-v2.0\envs\Microdrop-v1.0\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Users\automation\MicroDrop-v2.0\envs\Microdrop-v1.0\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Users\automation\MicroDrop-v2.0\envs\Microdrop-v1.0\lib\site-packages\microdrop_launcher\bin\profile_launcher.py", line 398, in <module>
    return_code = main()
  File "C:\Users\automation\MicroDrop-v2.0\envs\Microdrop-v1.0\lib\site-packages\microdrop_launcher\bin\profile_launcher.py", line 335, in main
    df_profiles = load_profiles_info(args.profiles_path)
  File "C:\Users\automation\MicroDrop-v2.0\envs\Microdrop-v1.0\lib\site-packages\microdrop_launcher\profile.py", line 73, in load_profiles_info
    profiles = yaml.load(profiles_str)
  File "C:\Users\automation\MicroDrop-v2.0\envs\Microdrop-v1.0\lib\site-packages\yaml\__init__.py", line 69, in load
    loader = Loader(stream)
  File "C:\Users\automation\MicroDrop-v2.0\envs\Microdrop-v1.0\lib\site-packages\yaml\loader.py", line 34, in __init__
    Reader.__init__(self, stream)
  File "C:\Users\automation\MicroDrop-v2.0\envs\Microdrop-v1.0\lib\site-packages\yaml\reader.py", line 79, in __init__
    self.determine_encoding()
  File "C:\Users\automation\MicroDrop-v2.0\envs\Microdrop-v1.0\lib\site-packages\yaml\reader.py", line 135, in determine_encoding
    self.update(1)
  File "C:\Users\automation\MicroDrop-v2.0\envs\Microdrop-v1.0\lib\site-packages\yaml\reader.py", line 169, in update
    self.check_printable(data)
  File "C:\Users\automation\MicroDrop-v2.0\envs\Microdrop-v1.0\lib\site-packages\yaml\reader.py", line 144, in check_printable
    'unicode', "special characters are not allowed")
yaml.reader.ReaderError: unacceptable character #x0000: special characters are not allowed
  in "<string>", position 0

Note that you can only see the traceback when starting the microdrop launcher from a command line. When started from a shortcut, the window exits before the user can see what went wrong.

The contents of the file are "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00". I'm not sure how the file got this way, but I have seen this happen on two separate computers.

It looks like the line:

profiles = yaml.load(profiles_str)

in microdrop_launcher/profile.py needs a try/except block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant