Perhaps you meant

localpath = os.path.join(self.config_dict['Station']['WEEWX_ROOT'],self.
skin_dict['Extras']['ptzcams'][ptzcam]

*-tk*

On Sun, Sep 24, 2017 at 10:26 AM, Joe Percival <[email protected]> wrote:

> well, I guess some things have changed or it's unhappy about being in the
> user directory because it crashed on line 16 (last line of code snippet
> below).  I notice that paths are defined differently in the new weewx
> imagegenerator.  Maybe I'll have to figure that out.
> # -*- coding: utf-8 -*-
>
> import Image, ImageFont, ImageDraw, urllib, urllib2, time
> import os, weewx.reportengine
> #===========================================================
> ====================
> #                    Class ImageGenerator
>
> #===========================================================
> ====================
>
> class CameraGenerator(weewx.reportengine.ReportGenerator):
>     """Class for managing the cam image generator."""
>
>     def run(self):
>        # localpath  = os.path.join(self.config_dict[
> 'Station']['WEEWX_ROOT'],self.skin_dict['HTML_ROOT'])
>         fontpath = self.skin_dict['Extras']['cam_lable_font_path']
>         ptzfontsize = int(self.skin_dict['Extras']['
> ptz_cam_lable_font_size'])
>         for ptzcam in self.skin_dict['Extras']['ptzcams'].keys():
>            * localpath = os.path.join(self.config_dict[*
> *'Station']['WEEWX_ROOT'],self.**skin_dict['HTML_ROOT'],ptzcam)*
>
>
> On Friday, September 22, 2017 at 11:27:16 AM UTC-7, Joe Percival wrote:
>>
>> I'm moving from a very old version of weewx (1.9.2 I think) to the latest
>> 3.7.1. I had developed a custom generator to capture and manipulate webcam
>> images.  A couple questions...
>> 1). The old location for the custom generator was alongside the weewx
>> generators in weewx/bin/weewx.  In the new scheme I understand that it
>> should be located in weewx/bin/user, correct?
>>
>> 2). The the generator uses the following modules:
>> Import Image, ImageFont, ImageDraw, urllib, urllib2, time, os,
>> weewx.reportengine
>> Does any of that need to change?
>>
>> 3). Do you know if any of the class definition language has changed?
>>
>> Any other hints about making this big version leap would be appreciated
>>
>> Thanks,
>> Joe
>>
>> --
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to