deta / cloud-docs

old docs. visit space docs instead:
https://github.com/deta/space-docs
Creative Commons Attribution 4.0 International
178 stars 67 forks source link

Cron NOT working #251

Closed legioz closed 2 years ago

legioz commented 2 years ago

Discussed in https://github.com/orgs/deta/discussions/250

Originally posted by **luizfelipevbll** June 5, 2022 I am using using deta **1.1.0** with Python with the exactly same code in the [docs](https://docs.deta.sh/docs/micros/cron/#cron-and-http) Every time I try to run the code I get this error: ImportError: cannot import name 'App' from 'deta' ```python from deta import App from fastapi import FastAPI app = App(FastAPI()) @app.get("/") def http(): return "Hello Deta, I am running with HTTP" @app.lib.cron() def cron_job(event): return "Hello Deta, I am a cron job" ``` --- I checked the deta code in deta/__init__.py This piece of code in deta lib is not working: ![image](https://user-images.githubusercontent.com/40257388/172073297-3951e03e-28aa-44df-bfe3-0d9217fc81ea.png) The exception raised is **No module named 'detalib'**
abdelhai commented 2 years ago

hi, left you a response https://github.com/deta/docs/discussions/250#discussioncomment-2889621