vikas pal8,545 Points
./ is not working in workspaces
Please see the video first before giving the answer. I done the same as described in the video but it is not working.I do 'chmod +x diary.py' and it done as in video and when i do ./diary.py it says no such file or directory.Please tell me where i done mistake and then what to do now.my code is below.
#!/usr/bin/env python3 import datetime from peewee import * db=SqliteDatabase('diary.db') class Entry(Model): content=TextField() timestamp=DateTimeField(default=datetime.datetime.now) class Meta(): database=db def initialize(): db.connect() db.create_tables([Entry],safe=True) def menu_loop(): """show the menu""" def add_entry(): """add an entry""" def view_entries(): """view previous entries""" def delete_entry(entry): """delete an entry""" if __name__=='__main__': initialize() menu_loop()
Help me please.
Jennifer NordellTreehouse Staff
Hi there, vikas! I have forked your workspace and reviewed the video. I, like yourself, get the same error you get when following the instructions exactly. However, Kenneth does mention that some variation may be needed. There is another way to run it. But at this point in the project, running the program will not actually produce any output. So on the last line of the diary.py file I added this line to make sure it's actually running.
Then in the console, type
python diary.py and you should see "Hi there!" printed to the screen. Hope this helps!