Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute Error #7

Open
puraabk20 opened this issue Jun 13, 2021 · 0 comments
Open

Attribute Error #7

puraabk20 opened this issue Jun 13, 2021 · 0 comments

Comments

@puraabk20
Copy link

puraabk20 commented Jun 13, 2021

Traceback (most recent call last):
File "C:/Users/Puraab/PycharmProjects/Puraab1/TEXT_AUTO.py", line 13, in
schedule.every().day.at(utils.scheduled_time).do(send_message)
AttributeError: module 'utils' has no attribute 'scheduled_time'

This was the code I executed:-

import time
import random
import schedule
import subprocess
import utils

def send_message():
subprocess.call("osascript message.applescript '%s' '%s'" % (f'{utils.phone_number}', f'{random.choice(utils.message)}'), shell=True)

if name == 'main':
schedule.every().day.at(utils.scheduled_time).do(send_message)

while True:
schedule.run_pending()
time.sleep(1)

phone_number = "+919********4"
message = ["Hi Buddy😊"]

scheduled_time = "14:37"

Please Help what to do now??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant