Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #203800 > unrolled thread

Python issue?

Started byriveravaldez <riveravaldezmail@gmail.com>
First post2019-01-02 14:30 +0100
Last post2019-01-02 23:30 +0100
Articles 4 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  Python issue? riveravaldez <riveravaldezmail@gmail.com> - 2019-01-02 14:30 +0100
    Re: Python issue? Steve Kemp <skx@debian.org> - 2019-01-02 14:50 +0100
    Re: Python issue? Carl Fink <carl@finknetwork.com> - 2019-01-02 16:50 +0100
    Re: Python issue? Michael Lange <klappnase@freenet.de> - 2019-01-02 23:30 +0100

#203800 — Python issue?

Fromriveravaldez <riveravaldezmail@gmail.com>
Date2019-01-02 14:30 +0100
SubjectPython issue?
Message-ID<xbOKS-7dk-17@gated-at.bofh.it>
Hi, I use phwmon [1] to have some system monitors on the taskbar.

Since last system update I have this message (and phwmon tries to
launch but fails):

$ phwmon.py
Traceback (most recent call last):
  File "Software/phwmon-master-b162e53dccc4adf8f11f49408d05fd85d9c6c909/phwmon.py",
line 341, in <module>
    HardwareMonitor()
  File "Software/phwmon-master-b162e53dccc4adf8f11f49408d05fd85d9c6c909/phwmon.py",
line 128, in __init__
    self.initDiskIo()
  File "Software/phwmon-master-b162e53dccc4adf8f11f49408d05fd85d9c6c909/phwmon.py",
line 274, in initDiskIo
    v = psutil.disk_io_counters(perdisk=False)
  File "/usr/lib/python2.7/dist-packages/psutil/__init__.py", line
2026, in disk_io_counters
    rawdict = _psplatform.disk_io_counters(**kwargs)
  File "/usr/lib/python2.7/dist-packages/psutil/_pslinux.py", line
1115, in disk_io_counters
    for entry in gen:
  File "/usr/lib/python2.7/dist-packages/psutil/_pslinux.py", line
1088, in read_procfs
    raise ValueError("not sure how to interpret line %r" % line)
ValueError: not sure how to interpret line '   8       0 sda 752155
419171 18693084 3393871 247845 1174668 17206000 688827 0 2271452
2271460 0 0 0 0\n'

Any hint/clue?

This seems to have already happened like a month ago [2], but the code
on GitLab hasn't changed in more than a year, so, the fix must have
come from some other way...

Thanks!

[1] https://gitlab.com/o9000/phwmon
[2] https://gitlab.com/o9000/phwmon/issues/3

[toc] | [next] | [standalone]


#203802

FromSteve Kemp <skx@debian.org>
Date2019-01-02 14:50 +0100
Message-ID<xbP4d-7k9-3@gated-at.bofh.it>
In reply to#203800
>   File "/usr/lib/python2.7/dist-packages/psutil/_pslinux.py", line
> 1088, in read_procfs
>     raise ValueError("not sure how to interpret line %r" % line)
>
> Any hint/clue?
>

  _pslinux.py opens /proc/diskstats, and tries to parse the contents.

  It finds a line "    8 0 sda ..." which it doesn't understand.

> This seems to have already happened like a month ago [2], but the code
> on GitLab hasn't changed in more than a year, so, the fix must have
> come from some other way...

  Perhaps you've upgraded your kernel, and different data has been
 stored in the file (which is a /proc file, and thus created by the
 kernel.)
 
> [1] https://gitlab.com/o9000/phwmon
> [2] https://gitlab.com/o9000/phwmon/issues/3

  Opening a bug, then closing it with no reason why must be very
 frustrating for the maintainer.  Not to mention others who hit the
 same problem.

  Regardless it seems your problem is with the pslinux python
 library which I guess is the Debian package `python-psutil`:

    https://packages.debian.org/search?keywords=python-psutil


Steve
-- 
https://steve.fi/

[toc] | [prev] | [next] | [standalone]


#203813

FromCarl Fink <carl@finknetwork.com>
Date2019-01-02 16:50 +0100
Message-ID<xbQWm-8tC-11@gated-at.bofh.it>
In reply to#203800
On Wed, Jan 02, 2019 at 10:20:53AM -0300, riveravaldez wrote:
> Hi, I use phwmon [1] to have some system monitors on the taskbar.

Snipping entire report here.

Why do you call this a Python issue? Have you tried just running phwmon with
a different Python version to see if that solves the problem?
-- 
Carl Fink                           nitpicking@nitpicking.com 

Read John Grant's book, Corrupted Science: http://a.co/9UsUoGu 
Dedicated to ... Carl Fink!

[toc] | [prev] | [next] | [standalone]


#203833

FromMichael Lange <klappnase@freenet.de>
Date2019-01-02 23:30 +0100
Message-ID<xbXbs-3Zf-17@gated-at.bofh.it>
In reply to#203800
Hi,

On Wed, 2 Jan 2019 10:20:53 -0300
riveravaldez <riveravaldezmail@gmail.com> wrote:

> Hi, I use phwmon [1] to have some system monitors on the taskbar.
> 
> Since last system update I have this message (and phwmon tries to
> launch but fails):
> 
(...)
>     raise ValueError("not sure how to interpret line %r" % line)
> ValueError: not sure how to interpret line '   8       0 sda 752155
> 419171 18693084 3393871 247845 1174668 17206000 688827 0 2271452
> 2271460 0 0 0 0\n'
> 
> Any hint/clue?

looks like maybe phwmon is not compatible with your current version of
python-psutil. Since the error does not occur here with Stretch I assume
you are running either Buster or Sid?
A possible workaround might be to copy the "psutil" folder of an older
compatible version into the directory where the phwmon executable sits.
However since there is some .so file included in python-psutil you would
probably have to compile first, and there is no gurantee that this will
work.

Regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

	"The combination of a number of things to make existence
worthwhile." "Yes, the philosophy of 'none,' meaning 'all.'"
		-- Spock and Lincoln, "The Savage Curtain", stardate
5906.4

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web