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

update impossible #51

Closed
francouai opened this issue Dec 21, 2022 · 14 comments
Closed

update impossible #51

francouai opened this issue Dec 21, 2022 · 14 comments
Labels
Question Further information is requested

Comments

@francouai
Copy link

Hello!
Sorry, but I'm not an expert on RPI, but I tried to update mt Pi Alert and I'm getting this error:
"chmod: changing permissions of '/home/pi/pialert/db/setting_darkmode': Operation not permitted"
Thanks

pi@Pi-hole:~ $ curl -sSL https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh | bash

############################################################
 Pi.Alert Update
############################################################
Wed 21 Dec 07:38:21 CET 2022
Logfile: pialert_update_2022-12-21_07-38.log

- Checking Python...
- Creating new Pi.Alert backup...
.....................................................................................................
- Cleaning previous version...
- Checking package apt-utils...
- Checking package sqlite3...
- Checking packages dnsutils & net-tools...
- Downloading update file...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 95.5M  100 95.5M    0     0  9371k      0  0:00:10  0:00:10 --:--:-- 18.1M

- Uncompressing tar file
.................................................................................................
- Deleting downloaded tar file...
- Config backup...
- Updating config file...
- Updating DB permissions...
chmod: changing permissions of '/home/pi/pialert/db/setting_darkmode': Operation not permitted
chmod: changing permissions of '/home/pi/pialert/db/pialertdb_20221213_105159.zip': Operation not permitted
chmod: changing permissions of '/home/pi/pialert/db/pialertdb_20221213_103841.zip': Operation not permitted
@leiweibau
Copy link
Owner

okay. I will check this. Despite the messages, the update should still have taken place.

@leiweibau
Copy link
Owner

I have edited the updatescript. Maybe you test it again.

@leiweibau leiweibau added the Question Further information is requested label Dec 21, 2022
@francouai
Copy link
Author

this is what I have now !
looks good!

pi@Pi-hole:~ $ curl -sSL https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh | bash

############################################################
 Pi.Alert Update
############################################################
Wed 21 Dec 09:33:58 CET 2022
Logfile: pialert_update_2022-12-21_09-33.log

- Checking Python...
- Creating new Pi.Alert backup...
.....................................................................................................
- Cleaning previous version...
- Checking package apt-utils...
- Checking package sqlite3...
- Checking packages dnsutils & net-tools...
- Downloading update file...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 95.5M  100 95.5M    0     0  10.0M      0  0:00:09  0:00:09 --:--:-- 18.4M

- Uncompressing tar file
.................................................................................................
- Deleting downloaded tar file...
- Config backup...
- Updating config file...
- Updating DB permissions...
- Installing sqlite3...
- Set Permissions...
- Create Logfile Symlinks...
- Testing Pi.Alert HW vendors database update process...
*** PLEASE WAIT A COUPLE OF MINUTES...
Traceback (most recent call last):
  File "/home/pi/pialert/back/pialert.py", line 30, in <module>
    import requests
ImportError: No module named requests

- Testing Pi.Alert Internet IP Lookup...
Traceback (most recent call last):
  File "/home/pi/pialert/back/pialert.py", line 30, in <module>
    import requests
ImportError: No module named requests

- Testing Pi.Alert Network scan...
*** PLEASE WAIT A COUPLE OF MINUTES...
Traceback (most recent call last):
  File "/home/pi/pialert/back/pialert.py", line 30, in <module>
    import requests
ImportError: No module named requests

------------------------------------------------------------
 Update process finished
------------------------------------------------------------

@leiweibau leiweibau reopened this Dec 21, 2022
@francouai
Copy link
Author

ticket reopened? :)

@leiweibau
Copy link
Owner

Obviously I need to check the updatescript again.
Was my fork already used before the update? Actually the install script should have installed the module "requests".

Please execute the following command:
python -V

If you use Python 3 please execute the command pip3 install requests.

If you use Python 2 please execute the command pip install requests.

@francouai
Copy link
Author

here it is:

pi@Pi-hole:~ $  python -V
Python 2.7.16
pi@Pi-hole:~ $ pip install requests
-bash: pip: command not found
pi@Pi-hole:~ $ pip3 install requests
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.21.0)

@francouai
Copy link
Author

this is what I have now and since the last update.
Pi.Alert  3.7.11  (2022-12-17)

@leiweibau
Copy link
Owner

Apparently pip is not installed either, under version 2. Can you run sudo apt install python-pip?

@leiweibau
Copy link
Owner

leiweibau commented Dec 21, 2022

If you don't depend on Python 2, it might also be better to switch to Python 3. This should eliminate all problems as well.
However, if pialert works for you (devices are found), then you can leave it at that. "requests" is used for push notifications

@francouai
Copy link
Author

once Python-PIp installed, I have now this:

pi@Pi-hole:~ $ pip install requests
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting requests
  Downloading https://files.pythonhosted.org/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e2b62af10435d269a9d0f40564d/requests-2.27.1-py2.py3-none-any.whl (63kB)
    100% |████████████████████████████████| 71kB 1.9MB/s
Collecting urllib3<1.27,>=1.21.1 (from requests)
  Downloading https://files.pythonhosted.org/packages/65/0c/cc6644eaa594585e5875f46f3c83ee8762b647b51fc5b0fb253a242df2dc/urllib3-1.26.13-py2.py3-none-any.whl (140kB)
    100% |████████████████████████████████| 143kB 1.6MB/s
Collecting certifi>=2017.4.17 (from requests)
  Downloading https://files.pythonhosted.org/packages/37/45/946c02767aabb873146011e665728b680884cd8fe70dde973c640e45b775/certifi-2021.10.8-py2.py3-none-any.whl (149kB)
    100% |████████████████████████████████| 153kB 1.5MB/s
Collecting idna<3,>=2.5; python_version < "3" (from requests)
  Downloading https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl (58kB)
    100% |████████████████████████████████| 61kB 1.9MB/s
Collecting chardet<5,>=3.0.2; python_version < "3" (from requests)
  Downloading https://files.pythonhosted.org/packages/19/c7/fa589626997dd07bd87d9269342ccb74b1720384a4d739a1872bd84fbe68/chardet-4.0.0-py2.py3-none-any.whl (178kB)
    100% |████████████████████████████████| 184kB 1.3MB/s
Installing collected packages: urllib3, certifi, idna, chardet, requests
  The script chardetect is installed in '/home/pi/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed certifi-2021.10.8 chardet-4.0.0 idna-2.10 requests-2.27.1 urllib3-1.26.13

@leiweibau
Copy link
Owner

This looks good.
If you click on "Scan" in the "Log Viewer" box on the Maintenance page, you should see the log file (unless a scan is currently running). You will see this in the "Status" area at the top). There should be no more errors here.

@francouai
Copy link
Author

haa yeah.. it works too.. I had nothing there too before.
BTW Thanks for pi-Alert!

@leiweibau
Copy link
Owner

Now I am willing to close the issue ;)
I wish you a wonderful Christmas season

@francouai
Copy link
Author

U2 !
it will be great to add this "upgrade" directly on the Maintenance menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants