def _store_picture(self):

        # Create today's directory
        now = datetime.datetime.now()
        year_dir = os.path.join(self._dir, str(now.year))
        if not os.path.exists(year_dir):
            os.mkdir(year_dir)
        month_dir = os.path.join(year_dir, str(now.month))
        if not os.path.exists(month_dir):
            os.mkdir(month_dir)
        day_dir  = os.path.join(month_dir, str(now.day))
        if not os.path.exists(day_dir):
            os.mkdir(day_dir)

        # Populate the directory
        for light, webcam_url in self._webcams_urls:
            try:
                image = self._opener.open(webcam_url).read()
                
                webcam_dir = os.path.join(day_dir, light)
                if not os.path.exists(webcam_dir):
                    os.mkdir(webcam_dir)

                image_file_path = os.path.join(webcam_dir, (now.hour, now.minute) % '%s_%s' )
                open(image_file_path, 'wb').write(image)
            except:
                if self._verbose:
                    traceback.print_exc()
                pass
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/experiments/incubator.py/StatusManager._store_picture/swapped operands of `%`