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

IOError: [Errno 25] Inappropriate ioctl for device #3508

Closed
caylorme opened this issue Aug 10, 2016 · 5 comments
Closed

IOError: [Errno 25] Inappropriate ioctl for device #3508

caylorme opened this issue Aug 10, 2016 · 5 comments

Comments

@caylorme
Copy link

Running in a docker container based on the DockerFile:

Traceback (most recent call last):
  File "/usr/src/app/pokecli.py", line 530, in <module>
    main()
  File "/usr/src/app/pokecli.py", line 96, in main
    bot.tick()
  File "/usr/src/app/pokemongo_bot/__init__.py", line 472, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "/usr/src/app/pokemongo_bot/cell_workers/catch_visible_pokemon.py", line 45, in work
    'expiration_timestamp_ms': pokemon['expiration_timestamp_ms'],
  File "/usr/src/app/pokemongo_bot/base_task.py", line 28, in emit_event
    data=data
  File "/usr/src/app/pokemongo_bot/event_manager.py", line 65, in emit
    handler.handle_event(event, sender, level, formatted_msg, data)
  File "/usr/src/app/pokemongo_bot/event_handlers/colored_logging_handler.py", line 130, in handle_event
    terminal_width = self._terminal_width()
  File "/usr/src/app/pokemongo_bot/event_handlers/colored_logging_handler.py", line 171, in _terminal_width
    struct.pack(str('HHHH'), 0, 0, 0, 0)))
IOError: [Errno 25] Inappropriate ioctl for device

Git Commit: 9ae1b78

This happens after encountering a pokemon.
Looks like it is now having a problem printing colors to the screen.

@MasterATM
Copy link

I have the same problem when I run the bot. It occurs when running the bot in non-interactive mode (with nohup in my case) and it is not able to get the size of the terminal as there is none.

@caylorme
Copy link
Author

to elaborate, I am also backgrounding my instance.

I run a custom script that will build the docker container and run it with a different entry point to start the webserver and bot at the same time while also binding the port for the web.

I'm able to see the standard output stream still until I exit, but the app should still continue to run in the background and have the logs accessible via docker.

@belinux
Copy link

belinux commented Aug 10, 2016

I had the same problem.. Fixed by setting: "logging_color": false

@k4n30
Copy link
Contributor

k4n30 commented Aug 12, 2016

@caylorme @carlosbellino @atmdev Try the latest version as logging_color has had some changes to it in the last 24 hours which may have fixed your problem

@engrjislam
Copy link

I had the same problem.. Fixed by setting: "logging_color": false

How do you did that? Can you explain a bit more in detail?

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

6 participants
@belinux @k4n30 @caylorme @engrjislam @MasterATM and others