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

"stty: standard input’: Inappropriate ioctl for device" when calling bdsf.process_image() on MacOS #155

Open
gabicca opened this issue Mar 25, 2021 · 0 comments

Comments

@gabicca
Copy link

gabicca commented Mar 25, 2021

When I run some code from the Terminal of MacOS, which calls bdsf.process_image(), I get the following (partial) output:

Minimum number of pixels per island ..... : 115
Number of islands found ................. : 19
stty: 'standard input': Inappropriate ioctl for device
stty: 'standard input': Inappropriate ioctl for device
Fitting islands with Gaussians .......... : [stty: 'standard input': Inappropriate ioctl for device
Fitting islands with Gaussians .......... :stty: 'standard input': Inappropriate ioctl for device
Fitting islands with Gaussians .........stty: 'standard input': Inappropriate ioctl for device
Fitting islands with Gaussians ......stty: 'standard input': Inappropriate ioctl for device
Fitting islands with Gaussians ....stty: 'standard input': Inappropriate ioctl for device
Fitting islands with Gaussians .stty: 'standard input': Inappropriate ioctl for device
Fitting islands with Gaussianstty: 'standard input': Inappropriate ioctl for device
Fitting islands with Gaussstty: 'standard input': Inappropriate ioctl for device
Fitting islands with Gaustty: 'standard input': Inappropriate ioctl for device
Fitting islands with stty: 'standard input': Inappropriate ioctl for device
Fitting islands wistty: 'standard input': Inappropriate ioctl for device
Fitting islandsstty: 'standard input': Inappropriate ioctl for device

I think this comes from bdsf.functions.getTerminalSize, when it's executing struct.unpack("hh", fcntl.ioctl(fd, termios.TIOCGWINSZ, "1234"))

My hunch is that the above termios constant is not good for Macs. I'm running it on MacOS Mojave.

It'd be great if there was a workaround for this on Macs, because it's cluttering the terminal output. If anyone has a solution, please let me know.

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