You are not logged in.

#1 2023-01-30 11:47:39

theRiddikulusGuy
Member
Registered: 2023-01-30
Posts: 7

Error while trying to install wpgtk

I am new to arch(also linux/GNU in general). So I was trying to install wpgtk on my new arch system with the command

 sudo pamac install wpgtk 

But there is an error while building the package:

==> Extracting sources...
  -> Extracting wpgtk-6.5.5.tar.gz with bsdtar
==> Starting build()...
Traceback (most recent call last):
  File "/var/cache/private/pamac/wpgtk/src/wpgtk-6.5.5/setup.py", line 10, in <module>
    import wpgtk
  File "/var/cache/private/pamac/wpgtk/src/wpgtk-6.5.5/wpgtk/__init__.py", line 4, in <module>
    from .data.config import __version__
  File "/var/cache/private/pamac/wpgtk/src/wpgtk-6.5.5/wpgtk/data/__init__.py", line 1, in <module>
    from . import color
  File "/var/cache/private/pamac/wpgtk/src/wpgtk-6.5.5/wpgtk/data/color.py", line 3, in <module>
    import pywal
  File "/usr/lib/python3.10/site-packages/pywal/__init__.py", line 12, in <module>
    from .settings import __version__, __cache_version__
  File "/usr/lib/python3.10/site-packages/pywal/settings.py", line 21, in <module>
    CACHE_DIR = os.getenv("PYWAL_CACHE_DIR", os.path.join(HOME, ".cache", "wal"))
  File "/usr/lib/python3.10/posixpath.py", line 76, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
==> ERROR: A failure occurred in build().
    Aborting...
Finished with result: exit-code
Main processes terminated with: code=exited/status=4
Service runtime: 3.315s
CPU time consumed: 1.653s

Offline

#2 2023-01-30 12:09:18

d.ALT
Member
Registered: 2019-05-10
Posts: 914

Re: Error while trying to install wpgtk

What if you try wpgtk-git ?


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#3 2023-01-30 12:10:20

theRiddikulusGuy
Member
Registered: 2023-01-30
Posts: 7

Re: Error while trying to install wpgtk

I tried that first, same error.

Offline

#4 2023-01-30 12:13:33

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: Error while trying to install wpgtk

Moving to AUR issues.


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

#5 2023-01-30 13:40:29

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: Error while trying to install wpgtk

You do not have $HOME set?

https://github.com/dylanaraps/pywal/blo … ngs.py#L20 sets HOME to $HOME if it is set else it sets it to $USERPROFILE if that is set,  if neither are sets HOME to None.
If HOME is set to None the next line will fail.

Offline

#6 2023-01-30 13:47:52

mpan
Member
Registered: 2012-08-01
Posts: 1,188
Website

Re: Error while trying to install wpgtk

theRiddikulusGuy:
No issues building the normal way (without AUR helpers), both in my current system and in clean chroot.

Please provide:

  • The complete output, when you build it without using AUR helpers.

  • Output of the following command (errors are fine, if you are missing the given package):

    pacman -Q 'python' 'python-pillow' 'python-gobject' 'gtk3' 'libxslt' 'python-pywal' 'python-setuptools'
  • Output of:

    pacman -Si 'python' 'python-pillow' 'python-gobject' 'gtk3' 'libxslt' 'python-pywal' 'python-setuptools' | LANG=C grep -E '^Version|^Name'

Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#7 2023-01-30 14:29:52

theRiddikulusGuy
Member
Registered: 2023-01-30
Posts: 7

Re: Error while trying to install wpgtk

Okay so I an the codes and it seems all packages you mentioned are installed:

$ pacman -Q python python-pillow python-gobject gtk3 libxslt python-pywal python-setuptools
python 3.10.9-1
python-pillow 9.4.0-2
python-gobject 3.42.2-1
gtk3 1:3.24.36-1
libxslt 1.1.37-2
python-pywal 3.3.0-7
python-setuptools 1:65.6.3-1
$ pacman -Si python python-pillow python-gobject gtk3 libxslt python-pywal python-setuptools | LANG=C grep -E '^Version|^Name'
Name            : python
Version         : 3.10.9-1
Name            : python-pillow
Version         : 9.4.0-2
Name            : python-gobject
Version         : 3.42.2-1
Name            : gtk3
Version         : 1:3.24.36-1
Name            : libxslt
Version         : 1.1.37-2
Name            : python-pywal
Version         : 3.3.0-7
Name            : python-setuptools
Version         : 1:65.6.3-1

Building the package without Pamac does seem to work:

git clone https://github.com/deviantfero/wpgtk
Cloning into 'wpgtk'...
remote: Enumerating objects: 7343, done.
remote: Counting objects: 100% (314/314), done.
remote: Compressing objects: 100% (104/104), done.
remote: Total 7343 (delta 214), reused 303 (delta 210), pack-reused 7029
Receiving objects: 100% (7343/7343), 2.82 MiB | 1.72 MiB/s, done.
Resolving deltas: 100% (4702/4702), done.

$ sudo pip install .
Processing /home/Utkarsh/Downloads/wpgtk
  Preparing metadata (setup.py) ... done
Requirement already satisfied: Pillow>=4.2.1 in /usr/lib/python3.10/site-packages (from wpgtk==6.5.5) (9.4.0)
Requirement already satisfied: pywal>=3.0.0 in /usr/lib/python3.10/site-packages (from wpgtk==6.5.5) (3.3.0)
Building wheels for collected packages: wpgtk
  Building wheel for wpgtk (setup.py) ... done
  Created wheel for wpgtk: filename=wpgtk-6.5.5-py3-none-any.whl size=50463 sha256=738a59525dc6cd1abb117bf2a29d7db15df27eeb615a47cef206c329824a118d
  Stored in directory: /tmp/pip-ephem-wheel-cache-1q4jl4jh/wheels/dd/78/56/d07f40917af8dc70fa338a5b1bf2a40fb12bf2187321232a13
Successfully built wpgtk
Installing collected packages: wpgtk
Successfully installed wpgtk-6.5.5
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv 

Running the wpg command though, throws another error:

$ wpg
ERROR:root:not a valid config file

Offline

#8 2023-01-30 14:35:42

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: Error while trying to install wpgtk

You are not supposed to use pip (and especially not as root) but makepkg to build the PKGBUILD properly, now you created a situation of files that are not handled nor tracked by pacman: You are strongly advised to read through https://wiki.archlinux.org/title/Arch_User_Repository

Which instructions did you follow to install Arch and is this even an Arch system or rather Manjaro? And even with pamac you do NOT run that with sudo/as root. These tools will call sudo internally when necessary and I assume all your initial problems stem from using sudo while not supposed to.

Last edited by V1del (2023-01-30 14:37:25)

Offline

#9 2023-01-30 14:42:14

theRiddikulusGuy
Member
Registered: 2023-01-30
Posts: 7

Re: Error while trying to install wpgtk

It's an arch system with gnome DE. I followed arch-wiki to install. I would have normally used makepkg for this task, but the git repository of this package told to do it this way with 'sudo' in the command they gave. I will take care not to follow instructions blindly again, I did make a snapshot yesterday so I will just revert to it if needed.

Offline

#10 2023-01-30 14:50:47

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: Error while trying to install wpgtk

What are the outputs from the following

$ echo $HOME
$ sudo echo $HOME

Edit:
Unsetting $HOME at the start of build() reproduces the issue.
If both of the commands show $HOME as being set then `sudo pamac` must have unset $HOME.

Last edited by loqs (2023-01-30 14:57:56)

Offline

#11 2023-01-30 14:57:44

theRiddikulusGuy
Member
Registered: 2023-01-30
Posts: 7

Re: Error while trying to install wpgtk

V1del wrote:

You are not supposed to use pip (and especially not as root) but makepkg to build the PKGBUILD properly, now you created a situation of files that are not handled nor tracked by pacman: You are strongly advised to read through https://wiki.archlinux.org/title/Arch_User_Repository

Which instructions did you follow to install Arch and is this even an Arch system or rather Manjaro? And even with pamac you do NOT run that with sudo/as root. These tools will call sudo internally when necessary and I assume all your initial problems stem from using sudo while not supposed to.



I really did not know that about not using sudo with AUR handlers, I have only switched from Debian/Windows dual boot system to full arch this week, I think I will have to do a fresh install then.

Last edited by theRiddikulusGuy (2023-01-30 14:58:05)

Offline

#12 2023-01-30 15:03:52

theRiddikulusGuy
Member
Registered: 2023-01-30
Posts: 7

Re: Error while trying to install wpgtk

loqs wrote:

What are the outputs from the following

$ echo $HOME
$ sudo echo $HOME

Edit:
Unsetting $HOME at the start of build() reproduces the issue.
If both of the commands show $HOME as being set then `sudo pamac` must have unset $HOME.


It shows /home/Username

Offline

#13 2023-01-30 15:04:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: Error while trying to install wpgtk

Fresh install is a bit too drastic of a measure. You can use sudo pip uninstall to uninstall the faulty files again (or as you mentioned, revert to a prior snapshot) and rerun makepkg as your normal user.  Nothing of that is drastic enough to mandate a reinstall unless you did it so routinely that many other system files are broken but I guess that shouldn't be the case.

Offline

#14 2023-01-30 15:10:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: Error while trying to install wpgtk

FWIW "sudo echo $HOME" is misleading as the variable is expanded before anything is passed to sudo or echo.  I'm pretty sure the test loqs intended to suggest would be the following:

sudo sh -c 'echo $HOME'

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#15 2023-01-30 15:17:34

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: Error while trying to install wpgtk

Trilby wrote:

FWIW "sudo echo $HOME" is misleading as the variable is expanded before anything is passed to sudo or echo.  I'm pretty sure the test loqs intended to suggest would be the following:

sudo sh -c 'echo $HOME'

I noticed the mistake,  changed it to `sudo printenv HOME` then copy pasted the original.  meh

Offline

#16 2023-01-30 15:20:49

theRiddikulusGuy
Member
Registered: 2023-01-30
Posts: 7

Re: Error while trying to install wpgtk

loqs wrote:
Trilby wrote:

FWIW "sudo echo $HOME" is misleading as the variable is expanded before anything is passed to sudo or echo.  I'm pretty sure the test loqs intended to suggest would be the following:

sudo sh -c 'echo $HOME'

I noticed the mistake,  changed it to `sudo printenv HOME` then copy pasted the original.  meh


That command shows

/root

Offline

#17 2023-01-30 16:11:45

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: Error while trying to install wpgtk

loqs wrote:

If both of the commands show $HOME as being set then `sudo pamac` must have unset $HOME.

mpan wrote:

No issues building … without AUR helpers

V1del wrote:

use sudo pip uninstall to uninstall the faulty files again (or as you mentioned, revert to a prior snapshot) and rerun makepkg as your normal user.

Offline

Board footer

Powered by FluxBB