Skip to content

Tag: python

How to use schedule library to schedule script in Python

I am trying to use import schedule library in Jupiter notebook as the Cron and Task scheduler in Windows doesn’t work for me. I am trying to execute this code every day at 8am. Can some one help define the job, thank you so much! Answer this one should work And instead of shedule library, i using here j…

Load data from model in view.py Django

I just started with Django and Python and I still don’t understand it very well. Would it be possible to access all the information stored in Persons, showing also orderstext and archivename, I can’t manage to do it :( my idea is to get all the information and save it as JSON, but I’m not ge…

Add reactions to embeds py-cord

Im making a discord bot and i decided to change from prefixed commands to slash command using pycord and my poll command it won’t add the reaction it will just send the embed without the reactions Here is my code: Before i decided to change to slash commands it worked perfectly fine I don’t know w…

What is the correct way to import this class?

I have the following repository structure: In moduleB.py I need to import MyClass, I use the following command: When I run the main() function in moduleB.py I have the following error: ModuleNotFoundError: No module named ‘directoryA’ I run the moduleB.py from directoryB in the following way: How …