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

grc windows [MsgToFile] Error opening file: can't have unbuffered text I/O #7311

Open
miweber67 opened this issue May 4, 2024 · 0 comments

Comments

@miweber67
Copy link

What happened?

Adding a Message To File block produces the following error when running:

[MsgToFile] Error opening file: can't have unbuffered text I/O

The issue is the ", 0" in MsgToFile.py:

      # 0 says unbuffered / write immediately
      if (overwrite):
        self.fp = open(filename,"w", 0)
      else:
        self.fp = open(filename,"a", 0)

Removing the ', 0' allows the MsgToFile block to work correctly, although output is now buffered. Manual flushing would need to be added to see the output right away. I didn't try to implement that.

System Information

OS: Windows 11
GR Installation Method: radioconda
gnuradio 3.10.9.2 (Python 3.11.7) on windows

GNU Radio Version

3.10 (maint-3.10)

Specific Version

3.10.9.2

Steps to Reproduce the Problem

Create a new GRC flowgraph. Add "Periodic Message Source" and a "Message To File" blocks. Connect them. Run the graph.

Relevant log output

[MsgToFile] Error opening file: can't have unbuffered text I/O
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant