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

Change split strings to byte arrays for drive detection #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Change split strings to byte arrays for drive detection #14

wants to merge 1 commit into from

Commits on Dec 27, 2018

  1. Change split strings to byte arrays for drive detection

    Using python 3.7.2 on Windows 10 (version 1803, build 17134.472, and running in Bootcamp) I repeatedly got the following error:
    
    ```
    Converting to uf2, output size: 50176, start address: 0x8000000
    Traceback (most recent call last):
      File "uf2conv.py", line 292, in <module>
        main()
      File "uf2conv.py", line 279, in main
        drives = get_drives()
      File "uf2conv.py", line 176, in get_drives
        for line in r.split('\n'):
    TypeError: a bytes-like object is required, not 'str'
    ```
    As well as a similar error for the regular expressions split line immediately following. Changing the split strings to byte array objects solved the problem for me, as shown in this commit
    oclyke committed Dec 27, 2018
    Configuration menu
    Copy the full SHA
    d660f1d View commit details
    Browse the repository at this point in the history