zkry / awqat

أوقات الصلاة
16 stars 5 forks source link

For some reason, it stopped working. I am getting "Cannot open load file: No such file or directory, awqat" #9

Closed AbeEtan closed 1 year ago

AbeEtan commented 1 year ago

It worked beautifully for a few hours then stopped working all of a sudden. I get the following error.

Cannot open load file: No such file or directory, awqat

zkry commented 1 year ago

Just from looking at the error, it seems it could be a problem with the package not existing on your load path. If you execute M-x eval-expression RET (require 'awqat) RET do you get the same error? If so, you may want to make sure that the package directory is in the load path.

(add-to-list 'load-path "~/mysubdir/awqat")

Definitely let me know if this doesn't work.

AbeEtan commented 1 year ago

This is exactly what I have in my init.el file. It worked for a few hours then stopped working.

;;Awqat - Islamic prayer times for Emacs
(add-to-list 'load-path "/home/abe/awqat/awqat.el")
(require 'awqat)
(setq calendar-latitude 21.487301)
(setq calendar-longitude 39.181339)
;;mode line mode to show the remaining time for the next prayer.
(setq awqat-mode-line-format " 🕌 ${prayer} (${hours}h${minutes}m) ")
(awqat-set-preset-muslim-world-league)
(setq awqat-isha-angle -21.0)  

image

As you can see from the image, the package exists in the load path variable. Not sure what is going on to be honest.

zkry commented 1 year ago

I think I see the problem. Try changing your add-to-list statement to the following:

(add-to-list 'load-path "/home/abe/awqat/")

I'm almost positive the load-path variable should be a list of directories so putting a file there wouldn't cause it to be loaded.

AbeEtan commented 1 year ago

Thank you so much. A silly mistake on my end. Thank you for your help. It worked the first time because I had set up with the directory then I changed it because I thought it was incorrect and causing a mistake, apparently not. Ha-ha!

zkry commented 1 year ago

awesome! glad it works now. Definitely let me know if you experience any other problems.