mrgmarsh / wfrog

Automatically exported from code.google.com/p/wfrog
GNU General Public License v3.0
0 stars 0 forks source link

Settings file creation fails on Windows because of script path guess #60

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download latest build for windows
2. plug wmrs200
3. start wfrog.exe in cmd

What is the expected output? What do you see instead?
Expected: Some useful message, Instead: http://cl.ly/2S1c0K1R0m0L2R0n092b

What version of the product are you using? On what operating system?
Windows XP Home SP3 with WMRS200

Original issue reported on code.google.com by commi1...@gmail.com on 6 Feb 2011 at 6:44

GoogleCodeExporter commented 9 years ago
I think you should start wfrog from within the directory you unzip it. It is 
looking for the configuration files relatively.

Original comment by laurent....@gmail.com on 11 Feb 2011 at 10:29

GoogleCodeExporter commented 9 years ago
See http://cl.ly/1t373N063q081E0j1l0p

cd'ed and executed wfrog: same.

Original comment by commi1...@gmail.com on 11 Feb 2011 at 11:05

GoogleCodeExporter commented 9 years ago
I found the cause: a unix-specific piece of code preventing the creation of 
settings. I would fix that for the next release.

In the meantime, you can create a folder named '.wfrog' in your home directory 
with a file inside named 'settings.yaml' containing:

altitude: 430
units:
  press: hPa
  rain: mm
  temp: C
  wind: km/h

Of course, adapt the values to your situation...

Original comment by laurent....@gmail.com on 11 Feb 2011 at 3:48

GoogleCodeExporter commented 9 years ago

Original comment by laurent....@gmail.com on 11 Feb 2011 at 4:03

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r694.

Original comment by laurent....@gmail.com on 15 Feb 2011 at 9:50

GoogleCodeExporter commented 9 years ago
Hey,

Thanks for the fix in trunk.

I've tried it today... First: To build fresh from trunk isnt very simple - The 
short description in /bin/wfrog is good, but some problems occured, which I 
fixed...

To make a build on a system without Python and other tools installed is tricky, 
so I've created a simple installer which installs any dependencies and build 
wfrog from trunk for windows.

Now I have the latest wfrog.exe which is wokring fine! I wish to see this build 
as replacement for the non-working windows-build in the download section ;)

I attach the latest build.

Does anyone has interest to use the little build-helper?

Original comment by commi1...@gmail.com on 19 Feb 2011 at 8:28

Attachments:

GoogleCodeExporter commented 9 years ago
Hey, again.

I've deleted my upload because I've got problems with usb. In this zip I've 
forgot any usb bindigs.

I've installed PyUSB1.0 (doesnt work over easy_install, why?) manually and 
built it again. The log say, wfrog has problems loading usb backend. See 
attached file.

Whats wrong?

Is OpenUSB required? The log search openusb but dont find it...

Original comment by commi1...@gmail.com on 19 Feb 2011 at 9:17

Attachments:

GoogleCodeExporter commented 9 years ago
Hi, I uploaded a new zip with the settings path fix: 
http://code.google.com/p/wfrog/downloads/detail?name=wfrog-win32-svn-20110218.zi
p 

Can you try it?

About USB, the needed native library for pyusb is libusb. It is included in the 
zip.
If you manage making your installer work, we are of course very interested. 
Currently, I use py2exe to generate the package from a XP system where I 
pre-installed all dependencies separately.

Original comment by laurent....@gmail.com on 20 Feb 2011 at 1:13

GoogleCodeExporter commented 9 years ago
Thanks, I'll try it.

11MB - My zip was 5MB... So, how you installed libusb? PyUSB-installation is no 
problem, but I dont found libusb for python - Or any way to install it. How can 
I install libusb correctly?

I'll update the build-helper currently due a few problems.

The interesting thing is: install py2exe over easy_install doesnt work for me. 
It says the installer exits with error: none and a few erros about: no filename 
match to the search "*.h" etc. So, I think I need a compiler.

I've fixed this by download the .exe installers for it.

Which compiler do you use to install dependencies over easy_install?

Original comment by commi1...@gmail.com on 20 Feb 2011 at 1:28

GoogleCodeExporter commented 9 years ago
Sorry, Seem to be another problem, see attached log - this was generated from 
your build.

Original comment by commi1...@gmail.com on 20 Feb 2011 at 1:32

Attachments:

GoogleCodeExporter commented 9 years ago
Ok, I've got it:

I've installed yesterday my WMRS200 over libusb_win32 with a inf...

I've removed the driver an let it reinstalled with windows HID drivers.

And I've found the way to install libusb:

1) Install PyUSB
2) copy libusb.dll and .lib to Python26/DLLs

Isnt that easy?

Now, any libusb error going away, but wfrog can't find the wmrs200

See attached log, again.

Original comment by commi1...@gmail.com on 20 Feb 2011 at 2:22

Attachments:

GoogleCodeExporter commented 9 years ago
Maybe, you should configure wfrog to use the wmrs200 station driver instead of 
auto-detection:

run 'wfrog --customize'

this will prepare the configuration files under %HOMEDIR%\AppData\Wfrog (or 
something similar).

In file wfdriver/config/embedded.yaml:

comment out the line station: !auto {}

and uncomment the one showing station: !wmrs200 {}

You can also change the log level in wflogger/config/wfrog.yaml:

logging:
    level: debug

Original comment by laurent....@gmail.com on 20 Feb 2011 at 7:04

GoogleCodeExporter commented 9 years ago
Hey,

Thank you, I'll try this on the next weekend. Currently Iam not @home, so I 
dont have my WMRS200 here :)

BTW: I'll fix a few bugs and add a new feature to my batch-script an post it 
here.

What it do:

- Download Python26, SlikSVN and Python's dependencies
- Check out latest trunk revision
- build wfrog.exe

I have currently a problem: _namemapper.pyd for Python26 is missing... :) As I 
described above, Cheetah provides only a binary for 2.4 and 2.5. Where can get 
you one for 2.6? Do you built it yourself?

Original comment by commi1...@gmail.com on 21 Feb 2011 at 10:32

GoogleCodeExporter commented 9 years ago
Okay. I installed Cheetah 2.2.2 for windows. It includes _namemapper.pyd

Original comment by laurent....@gmail.com on 21 Feb 2011 at 8:19

GoogleCodeExporter commented 9 years ago
Hey, I set wfrog up to use wmrs200 instead auto-detection and run wfrog 
--cutsomize which works.

After starting wfrog, same errors in the log. WMRS200 is connected, but wfrog 
dont find it.

I've installed PyUSB and copied libusb/W32/dll/libusb.dll & libusb.lib to 
/Python26/DLLs to get it working. Build ends without errors.

Some ideas?

Original comment by commi1...@gmail.com on 25 Feb 2011 at 7:35

GoogleCodeExporter commented 9 years ago
P.S.: If it helps, I can post all ways for install my Python-Environment.

Ah: I can't find the _namemapper.pyd in Cheetah2.2.2 - Where is it in the 
downloaded zip? I've tried to run setup.py install but it only generates a 
_namemapper.pyc

Original comment by commi1...@gmail.com on 25 Feb 2011 at 7:39

GoogleCodeExporter commented 9 years ago
Please submit the full log in debug mode (with -d).

Original comment by laurent....@gmail.com on 1 Mar 2011 at 7:37

GoogleCodeExporter commented 9 years ago
Thats amazing!

wfrog -d:

A very detailed log... And it says It got data from rain, wind, temp etc! 
localhost:7680/ shows the right current data! All works fine now?! I can't 
believe that!

So, I tried only wfrog without -d...

OOps: can't detect any station connectetd to this pc?? ...What?! -d works, and 
without not??

See attached log, I've marked the sections :)

Happy debugging :P

Original comment by commi1...@gmail.com on 3 Mar 2011 at 5:23

Attachments:

GoogleCodeExporter commented 9 years ago
Damn It! I've studied the log... 

Detected station Random Station Simulator

And from there it got the random data, right?

So, it neither works with or without -d...

-> wfrog -d
WARNING [station.auto] Could not probe station Oregon Scientific WMR200: USB 
WMR200 not found (0FDE CA01)

Bad, bad..

Original comment by commi1...@gmail.com on 3 Mar 2011 at 5:27

GoogleCodeExporter commented 9 years ago
You must first force the usage of the !wmrs200 station in your customized 
config file wfdriver/config/embedded.yaml 

This will avoid to use !auto to probe other stations (like WMR200). BTW, note 
that WMR200 and WMRS200 are two different stations (thus different drivers).

Take good care that you modify the file that is under your AppData (or alike) 
directory, not the one of the wfrog distribution. wfrog --customize creates 
this file.

When it is correctly configured with !wmrs200, you can give me the full log.

Note also that there are some details about libusb and windows in 
http://www.libusb.org/wiki/libusb-win32. Especially the driver you may need to 
install so that libusb can see your device. I could not test that, because I 
have no windows box (the only station I have is remote...)..

Original comment by laurent....@gmail.com on 4 Mar 2011 at 5:39

GoogleCodeExporter commented 9 years ago
I have forced the use of wmrs200 driver... I have forgot the embedded.yaml, now 
the Log looks like the attached.

I'll try some things with libusb. I'll post a reply soon.

Original comment by commi1...@gmail.com on 4 Mar 2011 at 6:17

Attachments:

GoogleCodeExporter commented 9 years ago
Laurent,

how do you installed PyUSB on your windows machine?

I've installed PyUSB 0.4.3.win32-py2.6 and PyUSB requires libusb (-win32).

I have found a installer, libusb0.dll is placed in system32 but still:

2011-03-04 20:02:40,079 ERROR [usb.backend.libusb10] Error loading libusb 1.0 
backend
Traceback (most recent call last):
  File "usb\backend\libusb10.pyc", line 600, in get_backend
  File "usb\backend\libusb10.pyc", line 160, in _load_library
OSError: USB library could not be found

How have you done that?

Original comment by commi1...@gmail.com on 4 Mar 2011 at 7:05

GoogleCodeExporter commented 9 years ago
I guess, i have installed it from http://sourceforge.net/projects/libusb-win32

On the page, there is some more details on operations to do to avoid that the 
OS "steals" the interface. That's maybe why wfrog cannot see it.

Original comment by laurent....@gmail.com on 4 Mar 2011 at 7:51

GoogleCodeExporter commented 9 years ago
BTW, we can join #wfrog on EFNet IRC: 
http://chat.efnet.org:9090/?channels=%23wfrog&Login=Login I am here tonight.

Original comment by laurent....@gmail.com on 4 Mar 2011 at 7:56