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

nanovna_capture.py: NameError: name 'bytestream' is not defined #3

Closed
Ho-Ro opened this issue Oct 18, 2023 · 0 comments
Closed

nanovna_capture.py: NameError: name 'bytestream' is not defined #3

Ho-Ro opened this issue Oct 18, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Ho-Ro
Copy link
Owner

Ho-Ro commented Oct 18, 2023

@krupis reported in NanoVNA-Saver/nanovna-saver#676:

C:\Users\petrikas.lu\Downloads\nanovna-tools-main\nanovna-tools-main>python nanovna_capture.py
Traceback (most recent call last):
  File "C:\Users\petrikas.lu\Downloads\nanovna-tools-main\nanovna-tools-main\nanovna_capture.py", line 115, in <module>
    if bytestream == b'capture?\r\nch> ': # error message
       ^^^^^^^^^^
NameError: name 'bytestream' is not defined

FIX: change bytestream to captured_bytes in this line

if len( captured_bytes ) != 2 * size:
    if bytestream == b'capture?\r\nch> ': # error message
        print( 'capture error - does the device support the "capture" cmd?' )
    else:
        print( 'capture error - wrong screen size?' )
    sys.exit()
@Ho-Ro Ho-Ro added the bug Something isn't working label Oct 18, 2023
@Ho-Ro Ho-Ro self-assigned this Oct 18, 2023
@Ho-Ro Ho-Ro closed this as completed in 3722fd2 Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant