Schedule cant be found - python-3.x

My problem is the schedule module doesn't work or exist python 3.10. I tried fixing the problem by installing and upgrade schedule. It doesn't work no matter what I do.

Related

How can I recreate the same env from a GitHub

I update an old repo: https://github.com/cbartel/nw-company-tool The creator of this project created a tutorial which explains how to install everything, only if you use his node distribution.
My question is: how do I recreate the same node distribution using the files in the tar.gz release?
What are the steps? Installing nest? then what? should I install angular? or? Should I run the build.ts? I don't know from where should I start. I come from Python. I know basic html, but I don't know how prisma, angular, nest, node and everything work.. I read and watch tutorials about the basic, but I still don't know where should I start for making that GitHub work on my Ubuntu server without using the guy's node distribution.
Can someone be so kind to check his repo and tell me from where to start? Will be really appreciate. I spent 40+ hours trying to start all .ts file but only with errors and unsuccessfully.
I tried to run in terminal the commands the ts script use, but got the same errors.
what am I missing?
I tried every command I found on the internet to fix the errors, but created just more errors.
I'm using Digital Ocean Ubuntu 20 as server with domain buy from ionos.
I try to run line of commands present in the files build.ts and other ts files. nothing works.
If I use his node distribution I get 0 errors. but the files are changed, and for doing 1 update, or add some data, I need to change 12 js files or more, that's why I'm trying to setup my distribution so I can edit just 4 files and everything should work fine, but I don't know how to create the same node distribution the guy released on his GitHub. I'm using his same files and I don't understand what is wrong.

PyTest Stuck When Upgrading From Python 3.8.3 to 3.10.7

I am developing an API in Python using FastAPI. I followed the user guide on https://fastapi.tiangolo.com/ and am very satisfied with the application.
I wanted to upgrade the Python version from 3.8.3 to 3.10.7 but I experienced a strange behavior when executing the unit tests. After the successful collection and execution, PyTest does not stop. Therefore all pipelines time out and cannot proceed with the project.
Let me show you the details:
All tests are green and PyTest returns with exit code 0. Good!
After upgrading to 3.10.7 following happens:
It neither locally (Windows) nor on CI (Docker Container) stops.
I considered event_loops that may be still running and other test plugins to execute the unit tests. I did not find a suitable solution yet.
Does anyone have an idea what the problem could originate from?
Any help is much appreciated.
Cheers,
L.
I've found the solution to my problem which was the following:
I used nest_asyncio internally which caused problems when stopping the nested event loop when executing the unit tests, because it did not work at all. I did not necessarily require asyncio to achieve the calls to an API internally. After having it explemented, the unit test stopped as expected. Surprisingly nest_asyncio is working with Python 3.8.3 but not with Python 3.10.7.
Update: GitHub Issue nest_asyncio

python package installation error while creating a webjob in azure

i am creating a webjob which has following python dependencies(azure-storage-blob==12.8.1,azure) along with other dependencies, the problem is here that my code is getting stuck at below from almost 3-4 hours only.
Dowenloading azure_common-1.1.8-py2.py3-none-any.whl(7.9kb)
pip is looking at multiple versions of azure-core to determine which version is compatible
with other requirements. This could take a while.
[08/12/2021 19:55:54 > d827c9: INFO] INFO: This is taking longer than usual. You might need to
provide the dependency resolver with stricter constraints to reduce runtime. If you want to
abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what
happened here: https://pip.pypa.io/surveys/backtracking
The thing is that if i installed specific version of azure then its not compatible with azure-storage-blob and its throwing error at importing blob storage and if f didnt install azure or other version of azure which is not compatible with azure-storage-blob==12.8.1 and throwing below error :
from azure.keyvault import KeyVaultAuthentication, KeyVaultClient
ImportError: cannot import name 'KeyVaultAuthentication'
does anyone know how to install python packages while creating azure webjob and also solution to overcome this issue
i have another question related to a triggered webjob , so suppose if i installed packages successfully so every time it runs whether it will install all the packages ever ytime or it will do only at first hit and saved packages in env
Check what the dependency tree looks like locally by running pip freeze and then provide the strict versions to prevent the dependency resolution timeouts.

run Python script program-like

again a beginners question...I got a Python 3.5 script i want to run on a windows server. I found that thread and some links like this one but stil are not clear.
I got my sript on my laptop and I am importing some packages like boto3 from AWS. Now I want to execute on a windows server and also have an option to stop it.
My script has a thread that is running in an infinity loop until some break conditions occur.
How to package my "program" so I can run it on the server right away without using pip to install all the packages I imported?
Should I turn my thread into a deamon?
How to add a start/stop automatic? I think once Python is added to the path a doubleclick can start it or u are using a bat file to call it...but how to stop it?
Can someone outline the steps I need to perform?
Referring to your first question, I would recommend you to look into Docker. Docker is a containerization technology that makes it easier to run your software on any OS. It also "orchestrates" the installation of your dependencies by building an image so that you don't have to it manually every time. See https://runnable.com/docker/python/dockerize-your-python-application

PyCharm CE and Auto-run

Sorry for the newbie question.
I am running PyCharm CE and would like to have my project run at a specific time every day, say 4 am local time but for the life of me I can't seem to figure out how, if at all possible to do this.
Any help is appreciated.
Thanks
First download pip
Second open up the terminal and use pip install schedule
Now you will be able to use the schedule library
The schedule library will allow you to run a function everyday

Resources