Skip to content

Logging to stdout create a logging error and infinite loop #1485

@DivingDuck

Description

@DivingDuck
          That one is working fine now, but found another one:

I got an logging error when Log to console is activated. I did a connect and disconnect. When I then try to close the Pronterface Window I'm not able to do so and got the second traceback w/o been able to close Pronterface. I need to kill the process manually.
Maybe also a path problem with dirs as I can't see any update in the log file.

Edit: I forgot to mention that the errors happen only if I run from the binary file - running from source is fine.

Terminal output:

Verbinde...
--- Logging error ---
Traceback (most recent call last):
Traceback (most recent call last):
Keine Verbindung zum Drucker.
--- Logging error ---
Traceback (most recent call last):
  File "logging\__init__.py", line 1153, in emit
  File "printrun\pronterface.py", line 113, in write
AttributeError: 'NoneType' object has no attribute 'write'

During handling of the above exception, another exception occurred:


Traceback (most recent call last):
  File "printrun\printcore.py", line 171, in logError
  File "printrun\pronsole.py", line 284, in logError
  File "logging\__init__.py", line 2162, in error
  File "logging\__init__.py", line 1548, in error
  File "logging\__init__.py", line 1664, in _log
  File "logging\__init__.py", line 1680, in handle
  File "logging\__init__.py", line 1736, in callHandlers
  File "logging\__init__.py", line 1026, in handle
  File "logging\__init__.py", line 1158, in emit
  File "logging\__init__.py", line 1074, in handleError
  File "printrun\pronterface.py", line 113, in write
AttributeError: 'NoneType' object has no attribute 'write'

--- Logging error ---
Traceback (most recent call last):
Traceback (most recent call last):

Originally posted by @DivingDuck in #1484 (comment) (above) and #1484 (comment) (below)

... I'm not sure that I had test this exact combination. The error only happen when I switch from not logging to stdout to logging to stdout and then restart Pronterface and there only if I run from binaries. Running from source is fine and do not show the behavior.

I need to take a closer look what happen with introducing this change (#1473) and why it fails in such a strange way and more over why there is no entry with the error in the log file as well...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions