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 fix TypeError when length is None #88

merged 1 commit into from Dec 5, 2018


Copy link

@miek miek commented Dec 5, 2018

I was getting the following when trying to run the uart applet under python 3.6.7:

$ glasgow run uart -V 5 tty
I: glasgow.device.hardware: device already has bitstream ID 5c5871f65cca35e67771380378527bd9
I: glasgow.cli: running handler for applet 'uart'
I: glasgow.applet.uart: port(s) A, B voltage set to 5.0 V
I: glasgow.applet.uart: running on a TTY; enter `Ctrl+\ q` to quit
Traceback (most recent call last):
  File "/usr/local/bin/glasgow", line 11, in <module>
    load_entry_point('glasgow==0.1', 'console_scripts', 'glasgow')()
  File "/usr/local/lib/python3.6/dist-packages/glasgow-0.1-py3.6.egg/glasgow/", line 662, in main
  File "/usr/lib/python3.6/asyncio/", line 473, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.6/dist-packages/glasgow-0.1-py3.6.egg/glasgow/", line 471, in _main
    await task
  File "/usr/local/lib/python3.6/dist-packages/glasgow-0.1-py3.6.egg/glasgow/", line 461, in run_applet
    await applet.interact(device, args, iface)
  File "/usr/local/lib/python3.6/dist-packages/glasgow-0.1-py3.6.egg/glasgow/applet/uart/", line 171, in interact
    await self._interact_tty(uart,
  File "/usr/local/lib/python3.6/dist-packages/glasgow-0.1-py3.6.egg/glasgow/applet/uart/", line 159, in _interact_tty
    quit_sequence=True, stream=stream)
  File "/usr/local/lib/python3.6/dist-packages/glasgow-0.1-py3.6.egg/glasgow/applet/uart/", line 128, in _forward
    data = await uart_fut
  File "/usr/local/lib/python3.6/dist-packages/glasgow-0.1-py3.6.egg/glasgow/access/direct/", line 112, in read
    hint = max(hint, length)
TypeError: '>' not supported between instances of 'NoneType' and 'int'

@whitequark whitequark merged commit 8806951 into GlasgowEmbedded:master Dec 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants