vanstinator / raincloudy

RainCloudy is a library written in Python 3.x that manages the Melnor RainCloud Smart Garden Watering Irrigation Timer.
Apache License 2.0
24 stars 7 forks source link

AttributeError #47

Open eniak11 opened 4 years ago

eniak11 commented 4 years ago

I am setting up a script in a server to notify me the status of the controller. The following is the beginning of the program:

!/usr/bin/python3

import time import smtplib, ssl import os import sys

from raincloudy.core import RainCloudy raincloudy = RainCloudy(my_email, my_password) status = raincloudy.controller.faucet.status battery = raincloudy.controller.faucet.battery

I first did this in Windows, Python 3.8.3 and it ran without any issue. Then, I tested it in Ubuntu 20.04 LTS on a Raspberry Pi, Python 3.8.2 but got the error:

raincloudy.controllers [<RainCloudyController: 5*****>] status=raincloudy.controller.faucet.status Traceback (most recent call last): File "", line 1, in AttributeError: 'RainCloudy' object has no attribute 'controller' battery=raincloudy.controller.faucet.status Traceback (most recent call last): File "", line 1, in AttributeError: 'RainCloudy' object has no attribute 'controller'

eniak11 commented 4 years ago

I decided to tinker with setting in Windows. I noticed I had 0.0.9 installed on Windows and the script was working without any problem. I pip uninstalled it. Then I installed 1.0.0. Now the same AttribueError in Windows as in Ubuntu. So it's not the OS problem. Thank you for your help.