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

[AIX] connections() raises UnicodeDecodeError #1489

Closed
giampaolo opened this issue Apr 16, 2019 · 3 comments
Closed

[AIX] connections() raises UnicodeDecodeError #1489

giampaolo opened this issue Apr 16, 2019 · 3 comments

Comments

@giampaolo
Copy link
Owner

Platform

  • AIX 7.2
  • 5.6.1

Bug description
Taken from #1486.

======================================================================
ERROR: psutil.tests.test_unicode.TestFSAPIsWithInvalidPath.test_proc_connections
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/freeware/lib64/python3.7/site-packages/psutil/tests/test_unicode.py", line 233, in test_proc_connections
    conn = psutil.Process().connections('unix')[0]
  File "/opt/freeware/lib64/python3.7/site-packages/psutil/__init__.py", line 1274, in connections
    return self._proc.connections(kind)
  File "/opt/freeware/lib64/python3.7/site-packages/psutil/_psaix.py", line 337, in wrapper
    return fun(self, *args, **kwargs)
  File "/opt/freeware/lib64/python3.7/site-packages/psutil/_psaix.py", line 456, in connections
    ret = net_connections(kind, _pid=self.pid)
  File "/opt/freeware/lib64/python3.7/site-packages/psutil/_psaix.py", line 230, in net_connections
    rawlist = cext.net_connections(_pid)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 48: invalid start byte
@giampaolo giampaolo self-assigned this Apr 16, 2019
@giampaolo giampaolo changed the title [OS] title [AIX] connections() raises UnicodeDecodeError Apr 16, 2019
@wiggin15
Copy link
Collaborator

There were 7 tests in the TestFSAPIsWithInvalidPath suite that failed in that ticket. They are probably all related to the invalid name we use: INVALID_NAME = TESTFN + "f\xc0\x80"

@giampaolo
Copy link
Owner Author

I wouldn't bother about unicode-related and tests. Same for tests. re the script directory. There's another couple of tests which drew my attention:

======================================================================
ERROR: psutil.tests.test_contracts.TestDeprecations.test_memory_info_ex
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/freeware/lib64/python3.7/site-packages/psutil/tests/test_contracts.py", line 185, in test_memory_info_ex
    w = ws[0]
IndexError: list index out of range

Does this mean memory_info() returns an empty tuple?

======================================================================
FAIL: psutil.tests.test_process.TestProcess.test_terminal
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/freeware/lib64/python3.7/site-packages/psutil/tests/test_process.py", line 306, in test_terminal
    self.assertEqual(terminal, tty)
AssertionError: None != '/dev/pts/0'

If we can't get terminal for the current process I guess we can't in general?

@no-response
Copy link

no-response bot commented Jan 2, 2021

This issue has been automatically closed because there has been no response for more information from the original author. Please reach out if you have or find the answers requested so that this can be investigated further.

@no-response no-response bot closed this as completed Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants