debanjum / ai-wallpaper

Get fresh, personal AI painted wallpapers on your phone or computer. Paints by using your current city, weather and even your recent experiences. Powered by Khoj AI
GNU General Public License v3.0
17 stars 0 forks source link

While running this command getting this error in termux android, python installed #1

Closed KarthiSurfer closed 6 months ago

KarthiSurfer commented 6 months ago

Traceback (most recent call last): File "/data/data/com.termux/files/home/ai-wallpaper/Wallpaper.py", line 26, in import requests ModuleNotFoundError: No module named 'requests'

debanjum commented 6 months ago

Ah, thanks for notifying about that! You'll need to pip install requests to install the requests dependency before running the script for now. Let me also update the code to have a requirements.txt, pyproject.toml so pip install . should suffice in getting all dependencies

debanjum commented 6 months ago

I've simplified the project setup and published it to pypi as ai-wallpaper. I'm marking the issue as resolved for now but please feel free to reopen it f you're still stuck.

KarthiSurfer commented 6 months ago

@debanjum , thank you for your quick response, after running the new command it's not throwing any error but its stuck like this without any progress

  1. Generating Wallpaper from Prompt: Create a personalized painting using the local weather and my recent experiences. The time is 05:03.
    • Search online for the current weather here (in SI units).
    • If it is night, search online for the moon phase here. - Search my personal notes for ONLY my experiences from the last 2 days and nothing else (use date filters).
    • Do NOT perform any weather, moon phase related search in my notes or documents.
      Use the above information to create a hyper-local, deeply personal painting for me. I'll use it as my phone's wallpaper.
debanjum commented 6 months ago

Hi @KarthiSurfer, glad to know the dependency requirement is resolved. It's unfortunate that the app still isn't painting the wallpaper for you though!

How long was it stuck in that state? Does the script eventually succeed or fail? Also can you share the command you're running? Is your KHOJ_API_TOKEN environment variable set?

Note:

  1. It usually takes 2-3 mins to collect the info from the internet and paint the wallpaper for me
  2. Every once in ~3-5 tries the update fails

For me that's manageable (though it could be a lot better) as I run it in background but YMMV.