Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Message in logs and not send nodification #163

Closed
gregtux77 opened this issue Feb 3, 2023 · 14 comments
Closed

Error Message in logs and not send nodification #163

gregtux77 opened this issue Feb 3, 2023 · 14 comments
Labels
bug 🐛 Something isn't working next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed. Workaround provided ⚒️ A workaround for the issue was provided so no further actions will be taken.

Comments

@gregtux77
Copy link

hello i m an error with latest version, this's same problem ?

sys.exit(main())
File "/home/pi/pialert/back/pialert.py", line 599, in main
send_notifications()
File "/home/pi/pialert/back/pialert.py", line 2281, in send_notifications
update_api(True)
File "/home/pi/pialert/back/pialert.py", line 3100, in update_api
write_file(folder + 'notification_text.txt' , mail_text)
File "/home/pi/pialert/back/pialert.py", line 3167, in write_file
file = open (pPath, 'w', encoding='utf-8')
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/pialert/front/api/notification_text.txt'

moreover I note that the swap is filled progressively...

image :jokobsk/pi.alert:latest
Raspi : P4

tky for your time

@masterwishx
Copy link

Also have this problem and stoped app ...

image

@masterwishx
Copy link

Using last version in Unraid (Linux x64) Docker

@masterwishx
Copy link

@gregtux77

Fixed by disabled API setting and changed Pi.Alert URL to my http://192.168.0.199:20211

but still dont know why was problem with API in last version ....

maybe becose we need to add to docker setup :

${DEV_LOCATION}/front/api:/home/pi/pialert/front/api

i dint checked it ....

@gregtux77
Copy link
Author

hi,
I just did the test by disabling API. I have the same problem, always an error message.
image

the "Apprise" component still does not work with a telegram account
image

@masterwishx
Copy link

Did you also changed pi.Alert URL from default to you URL?

@masterwishx
Copy link

I have only webhook for discord for now...

@gregtux77
Copy link
Author

Did you also changed pi.Alert URL from default to you URL?

I changed the url for my local domain

@masterwishx
Copy link

Still have error and stopped container?
Try to update container, maybe need to remove and then recreate...
Or add to docker setup
${DEV_LOCATION}/front/api:/home/pi/pialert/front/api

@jokob-sk
Copy link
Owner

jokob-sk commented Feb 3, 2023

Hi @masterwishx @gregtux77 !

Thanks for reporting and helping out @masterwishx ! Really appreciate it :)

I think I know what's wrong. I'll confirm in a few hours, but I think:

  1. The script is failing on the missing 'home/pi/pialert/front/api' folder so probably the fix is to
  2. Disable the API by setting ENABLE_API=False in the pialert.conf file or in the settings
  3. SSH into the container and run mkdir /home/pi/pialert/front/api
  4. Enable the API again by setting ENABLE_API=True

Cause if interested:

I created the /api/ directory on my local dev environment, but wanted to exclude sensitive data so placed a gitignore file in the folder, which completely removed the whole folder from the source.

For those who are impatient, this dev build should fix the issue:

🩹DockerHub image tag is:

jokobsk/pi.alert_dev:sha-b5f0a64

@jokob-sk
Copy link
Owner

jokob-sk commented Feb 3, 2023

FYI Confirmed: The above workaround works on my end. Will be fixed in the next release.

@jokob-sk jokob-sk added bug 🐛 Something isn't working next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed. labels Feb 3, 2023
@jokob-sk
Copy link
Owner

jokob-sk commented Feb 3, 2023

For those who are impatient, this dev build should fix the issue:

DockerHub image tag is:

jokobsk/pi.alert_dev:sha-b5f0a64

@jokob-sk jokob-sk added Workaround provided ⚒️ A workaround for the issue was provided so no further actions will be taken. Fixed in _dev image labels Feb 4, 2023
@masterwishx
Copy link

Thanks for reporting and helping out @masterwishx ! Really appreciate it :)

Glad to help, also founded after all in console of container that font/api folder not found

@gregtux77
Copy link
Author

Did you also changed pi.Alert URL from default to you URL?

i change

jokobsk/pi.alert_dev:sha-b5f0a64

Hello ,

It's perfect . I deployed the dev version and I no longer have any errors. The home/pi/pialert/front/api directory exists.

I reactivated the API and Apprise.. I'll test a little more but I think it's ok

Congratulations guys and thanks again for the responsiveness

@jokob-sk
Copy link
Owner

🆕 New release is live -> closing this issue:

@jokob-sk jokob-sk unpinned this issue Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed. Workaround provided ⚒️ A workaround for the issue was provided so no further actions will be taken.
Projects
None yet
Development

No branches or pull requests

3 participants