jbudd
Posts: 2093
Joined: Mon Dec 16, 2013 10:23 am

Installing Python Watchdog Module

Mon Dec 16, 2013 10:38 am

I am trying to install the Python Watchdog module so that my script can send keep-alive ticks to the PI's hardware watchdog.

The command pip install watchdog gives this..
Downloading/unpacking watchdog
Downloading watchdog-0.6.0.tar.gz (76kB): 76kB downloaded
Running setup.py egg_info for package watchdog

no previously-included directories found matching 'docs/source/_themes/.git*'
Downloading/unpacking PyYAML>=3.09 (from watchdog)
Downloading PyYAML-3.10.tar.gz (241kB): 241kB downloaded
Running setup.py egg_info for package PyYAML

Downloading/unpacking argh>=0.8.1 (from watchdog)
Downloading argh-0.23.3.tar.gz
Running setup.py egg_info for package argh
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/usr/lib/python3.3/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 103: ordinal not in range(128)
A little google tells me this might be because it runs out of memory.
I have gpu_mem_512=64 in /boot/config.txt but putting this back to the default doesnt change the error, nor the point where it occurs.

Has anyone else experienced this and found the solution?

drirr
Posts: 54
Joined: Sun Sep 09, 2012 8:06 am

Re: Installing Python Watchdog Module

Tue Dec 17, 2013 6:35 pm

I don't think it's a memory issue. It looks like "argh" tries to force non-ascii encoded data (0xc2 or 194 if you prefer non-hexadecimal) as ascii (which has the range 0-127).

I've not found any direct matches to your issue, but could it be have non-ascii characters in the path where it is trying to install?
Raspberry Pi (rev 000f, 512MB RAM) with heatsinks and a modmypi case running Arch Linux ARM (armv6h) hooked up to a 750GB 2.5" USB-harddrive

jbudd
Posts: 2093
Joined: Mon Dec 16, 2013 10:23 am

Re: Installing Python Watchdog Module

Wed Dec 18, 2013 4:22 pm

There are no abnormal pathnames as far as I know.

I tested again with a brand new installation of Arch via NOOBS:

login as root
# pacman -Syu
# pacman -S python
# pacman -S python-pip
(All OK so far...)
# pip install watchdog
And I get the same error.

Perhaps Python Watchdog is just incompatible with Arch Linux

drirr
Posts: 54
Joined: Sun Sep 09, 2012 8:06 am

Re: Installing Python Watchdog Module

Wed Dec 18, 2013 6:16 pm

What locale are you using?

It could also be that watchdog, or rather its dependency "argh" isn't compatible with python 3. You could try installing it via python2:

Code: Select all

pacman -Sy python2 python2-pip
pip2 install watchdog
Raspberry Pi (rev 000f, 512MB RAM) with heatsinks and a modmypi case running Arch Linux ARM (armv6h) hooked up to a 750GB 2.5" USB-harddrive

jbudd
Posts: 2093
Joined: Mon Dec 16, 2013 10:23 am

Re: Installing Python Watchdog Module

Thu Dec 19, 2013 5:54 am

What locale are you using?
I had not done anything about the locale, didn't know it might be important.

After I set it to en_GB.utf-8, watchdog installed ok.

Thanks for the suggestion!

jb

drirr
Posts: 54
Joined: Sun Sep 09, 2012 8:06 am

Re: Installing Python Watchdog Module

Thu Dec 19, 2013 4:26 pm

Glad to hear you got it working! :-)
Raspberry Pi (rev 000f, 512MB RAM) with heatsinks and a modmypi case running Arch Linux ARM (armv6h) hooked up to a 750GB 2.5" USB-harddrive

Return to “Arch”