*Notes on my way to nowhere*

11:41 AM   Saturday, April 6, 2019  (VKB)

Matt says:
then i installed the harmonics file:

sudo mkdir /opt/harmonics
cd /opt/harmonics
tar xvf ~/Downloads/harmonics-dwf-20181227-free.tar.bz2

=========================
1)
Just checking, should permissions be addressed?, i.e.:
sudo mkdir /opt/harmonics
sudo chmod 755 /opt/harmonics

or are they okay by default?

2)
cd /opt/harmonics
tar xvf ~/Downloads/harmonics-dwf-20181227-free.tar.bz2

This results in failure.
pi@raspberrypi:~ $ sudo mkdir /opt/harmonics
pi@raspberrypi:~ $ cd /opt/harmonics
pi@raspberrypi:/opt/harmonics $ tar xvf 
~/Downloads/harmonics-dwf-20181227-free.tar.bz2
harmonics-dwf-20181227/
tar: harmonics-dwf-20181227: Cannot mkdir: Permission denied
harmonics-dwf-20181227/harmonics-dwf-20181227-free.tcd
tar: harmonics-dwf-20181227: Cannot mkdir: Permission denied
tar: harmonics-dwf-20181227/harmonics-dwf-20181227-free.tcd: Cannot open: 
No such file or directory
harmonics-dwf-20181227/README
tar: harmonics-dwf-20181227: Cannot mkdir: Permission denied
tar: harmonics-dwf-20181227/README: Cannot create symlink to ‘COPYING’: No 
such file or directory
harmonics-dwf-20181227/Disclaimers
tar: harmonics-dwf-20181227: Cannot mkdir: Permission denied
tar: harmonics-dwf-20181227/Disclaimers: Cannot create symlink to 
‘COPYING’: No such file or directory
harmonics-dwf-20181227/ChangeLog
tar: harmonics-dwf-20181227: Cannot mkdir: Permission denied
tar: harmonics-dwf-20181227/ChangeLog: Cannot open: No such file or 
directory
harmonics-dwf-20181227/COPYING
tar: harmonics-dwf-20181227: Cannot mkdir: Permission denied
tar: harmonics-dwf-20181227/COPYING: Cannot open: No such file or directory
harmonics-dwf-20181227/AUTHORS
tar: harmonics-dwf-20181227: Cannot mkdir: Permission denied
tar: harmonics-dwf-20181227/AUTHORS: Cannot create symlink to ‘COPYING’: No 
such file or directory
tar: Exiting with failure status due to previous errors

3)
pi@raspberrypi:/opt/harmonics $ sudo tar xvf 
~/Downloads/harmonics-dwf-20181227-free.tar.bz2

sudo is required because we're making a sub-directory during extraction; 
i.e., 
/opt/harmonics/harmonics-dwf-20181227

4)
Just checking, should permissions be addressed?, i.e.:
pi@raspberrypi:$ sudo chmod 644 
/opt/harmonics/harmonics-dwf-20181227/harmonics-dwf-20181227-free.tcd

or are they okay by default?

5)
Why bury/ nest the harmonics file below /opt/harmonics/
Why not have /opt/harmonics/harmonics-dwf-20181227-free.tcd


Matt says:
this is my tide wrapper at /opt/weewx/bin/user/tide.sh (there are only 2 
lines in the file):

#!/bin/sh
HFILE_PATH=/opt/harmonics/harmonics-dwf-20181227/harmonics-dwf-20181227-free.tcd
 
LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/tide "$@"

=========================

6)
No such folders exist.

pi@raspberrypi:/ $ sudo mkdir /opt/weewx
pi@raspberrypi:/ $ sudo mkdir /opt/weewx/bin
pi@raspberrypi:/ $ sudo mkdir /opt/weewx/bin/user

Created tide.sh, then
sudo cp /home/pi/weewx/extensions/forecast/tide.sh 
/opt/weewx/bin/user/tide.sh

Here again, just checking, should permissions be addressed?


Matt says:

i generated tide output for testing like this:

/opt/weewx/bin/user/tide.sh -l ellsworth -fc -df'%Y.%m.%d' -tf'%H:%M' > 
/var/tmp/ellsworth.txt

============================

7)
Permission denied.

pi@raspberrypi:/opt/weewx/bin/user $ /opt/weewx/bin/user/tide.sh -l 
ellsworth -fc -df'%Y.%m.%d' -tf'%H:%M' > /var/tmp/ellsworth.txt
bash: /opt/weewx/bin/user/tide.sh: Permission denied

pi@raspberrypi:/opt/weewx/bin/user $ sudo /opt/weewx/bin/user/tide.sh -l 
ellsworth -fc -df'%Y.%m.%d' -tf'%H:%M' > /var/tmp/ellsworth.txt
sudo: /opt/weewx/bin/user/tide.sh: command not found

pi@raspberrypi:/ $ cd  /opt/weewx/bin/user/
pi@raspberrypi:/opt/weewx/bin/user $ ls
tide.sh
pi@raspberrypi:/opt/weewx/bin/user $ 


8)
Has Matt directed to wrong location or is it only an issue of permissions 
to be considered in any of what he outlined?

First, let's try it with permissions set:
sudo chmod 755 /opt/weewx/bin/user/tide.sh

Then once again:
pi@raspberrypi:/ $ /opt/weewx/bin/user/tide.sh -l ellsworth -fc 
-df'%Y.%m.%d' -tf'%H:%M' > /var/tmp/ellsworth.txt
bash: /opt/weewx/bin/user/tide.sh: /bin/sh^M: bad interpreter: No such file 
or directory
pi@raspberrypi:/ $

Issue created by initial creating tide.sh in TextPad on PC, specifically, 
new line in PC mode. Edited again in TextPad and saved as UNIX.

And again:
pi@raspberrypi:~/weewx/extensions/forecast $ /opt/weewx/bin/user/tide.sh -l 
ellsworth -fc -df'%Y.%m.%d' -tf'%H:%M' > /var/tmp/ellsworth.txt
Indexing 
/opt/harmonics/harmonics-dwf-20181227/harmonics-dwf-20181227-free.tcd...

Success! /var/tmp/ellsworth.txt was created YAY!


Matt says:

then i verified the tide parsing like this:

PYTHONPATH=bin python bin/user/forecast.py --action=parse --method=xtide 
--filename=/var/tmp/ellsworth.txt --debug

==================================

9)
pi@raspberrypi:~/weewx/extensions/forecast $ PYTHONPATH=bin python 
bin/user/forecast.py --action=parse --method=xtide 
--filename=/var/tmp/ellsworth.txt --debug
python: can't open file 'bin/user/forecast.py': [Errno 2] No such file or 
directory
pi@raspberrypi:~/weewx/extensions/forecast $ 



I'm thinking that Matt says the wrong location for forecast.py

Trying next:
PYTHONPATH=bin python /usr/share/weewx/user/forecast.py --action=parse 
--method=xtide --filename=/var/tmp/ellsworth.txt --debug

Which then reults:
pi@raspberrypi:/ $ PYTHONPATH=bin python /usr/share/weewx/user/forecast.py 
--action=parse --method=xtide --filename=/var/tmp/ellsworth.txt --debug
Traceback (most recent call last):
  File "/usr/share/weewx/user/forecast.py", line 566, in <module>
    import weewx
ImportError: No module named weewx


10)
At this point I cry uncle. 2:18 PM   Saturday, April 6, 2019  (VKB)











On Friday, April 5, 2019 at 5:24:39 PM UTC-4, mwall wrote:
>
> please try the attached forecast 3.4.0rc2.py.  i did an install of tide 
> 2.15.2 on a raspberry pi, with no other tide installation, and it works 
> with forecast 3.4.0rc2.py
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to