Ax-Shell icon indicating copy to clipboard operation
Ax-Shell copied to clipboard

I finally got AX-Shell to download, but main.py has typecode error

Open ggpie opened this issue 1 year ago • 15 comments

As the title says, I've managed to get the shell to download completely, but when I run main.py I get the following error:

"File "/home/__/.local/lib/python3.13/site-packages/gi/propertyhelper.py", line 150, in init self.check_default() ~~~~~~~~~~~~~~~~~~~^^ File ["/home//.local/lib/python3.13/site-packages/gi/_propertyhelper.py",] line 289, in _check_default elif not _gi.GType(default).is_a(ptype): ~~~~~~~~~^^^^^^^^^ TypeError: could not get typecode from object"

I've tried multiple versions of python, but for some reason it can't get passed this stage. Any ideas?

Image

ggpie avatar Sep 19 '25 18:09 ggpie

It appears my PyGobject wasn't upgraded enough to work with fabric.

So after upgrading to PyGobject, I now only get this issue:

"ImportError: cannot import name 'Application' from 'fabric' (/home/_____/.local/lib/python3.13/site-packages/fabric/init.py)"

Image

ggpie avatar Sep 19 '25 19:09 ggpie

Hi, you'll have to run this:

yay -S python-fabric-git --devel

For some reason Fabric sometimes fails to install with the script, no idea why.

Axenide avatar Sep 19 '25 20:09 Axenide

Hmm, unfortunately I've installed it many times (I looked up the issue other people were having on Discord) but I keep getting the same error, regardless. Fabric appears to be installed, and pacman says it's installed.

Image

Perhaps it's another issue I'm not seeing.

ggpie avatar Sep 19 '25 23:09 ggpie

Hmm... This is really weird. The program can't find Fabric but it is right there, I don't know what it could be. Could you try reinstalling Fabric? Or try to import it in another Python script.

Axenide avatar Sep 20 '25 00:09 Axenide

Hi, I also encountered this, you can try what is indicated here https://github.com/Fabric-Development/fabric/issues/95

I also struggled with this problem for about 3 days.

xwr-ron avatar Sep 20 '25 01:09 xwr-ron

Hi, I also encountered this, you can try what is indicated here Fabric-Development/fabric#95

I also struggled with this problem for about 3 days.

Thanks, I tried that but sadly I just get another TypeError. I suppose I could try another python script, though I've tried a number of them at this point. I'm using python 3.13.7

Image

ggpie avatar Sep 20 '25 01:09 ggpie

Hmm... This is really weird. The program can't find Fabric but it is right there, I don't know what it could be. Could you try reinstalling Fabric? Or try to import it in another Python script.

Do you have a recommendation? I'm curious which version of Python you used. I'm using 3.13.7.

Image

ggpie avatar Sep 20 '25 01:09 ggpie

Yes, I know how to fix it, but frankly speaking it is not the best option that I did, but at least it allowed me to launch the bar

https://github.com/Axenide/Ax-Shell/issues/184#issuecomment-2993483435

I strongly recommend that you delete everything and run the script specified in the readme.md and monitor each log. This allowed me to quickly solve this problem when I installed the bar on another machine.

xwr-ron avatar Sep 20 '25 02:09 xwr-ron

It did install the lockscreen which is new. I noticed I get the "ImportError: cannot import name 'Application' from 'fabric'" error when I'm out of the virtual environment, and a typecode error when I'm in it. I've been at this for days, lol.

ggpie avatar Sep 20 '25 02:09 ggpie

Let's do this: delete everything you have associated with ax-shell now, record your terminal session with the installation via command using asciinema and send the links or file

xwr-ron avatar Sep 20 '25 02:09 xwr-ron

Let's do this: delete everything you have associated with ax-shell now, record your terminal session with the installation via command using asciinema and send the links or file

I'll do that, thanks!

ggpie avatar Sep 20 '25 02:09 ggpie

Here's both methods tried. I'm still not sure what I'm missing.

https://files.catbox.moe/9a82nf.cast

https://files.catbox.moe/2zb3lk.cast

ggpie avatar Sep 20 '25 17:09 ggpie

Hi, thanks for the output. I checked it and noticed you're pulling in a later version of PyGobject. That's odd, because I have it installed. Below is the version output from the global environment.

My

$ pip list | grep -E "click|loguru|pycairo|PyGObject|fabric"
click              8.2.1
fabric             0.0.2
loguru             0.7.3
pycairo            1.28.0
PyGObject          3.52.3

Your

Image

I also noticed a conflict with swww when installing packages.

:: Calculating conflicts...
:: Calculating inner conflicts...

:: Conflicts found:
swww-git: swww

This may be the main reason for the broken application build. You should remove all conflicting packages (currently swww, not swww-git, since it's specified in install.sh). It's advisable to clear the Pacman cache, yay and installed python dependencies and try again, but this time watch out for errors

$ yay -Scc
$ sudo pacman -Scc
$ pip freeze > pip.txt
$ pip uninstall -r pip.txt -y
$ rm pip.txt

UPD:

Thanks, I tried that but sadly I just get another TypeError. I suppose I could try another python script, though I've tried a number of them at this point. I'm using python 3.13.7

I also have this version now.

xwr-ron avatar Sep 20 '25 18:09 xwr-ron

Hi, thanks for the output. I checked it and noticed you're pulling in a later version of PyGobject. That's odd, because I have it installed. Below is the version output from the global environment.

My

$ pip list | grep -E "click|loguru|pycairo|PyGObject|fabric" click 8.2.1 fabric 0.0.2 loguru 0.7.3 pycairo 1.28.0 PyGObject 3.52.3

Your

Image

I also noticed a conflict with swww when installing packages.

:: Calculating conflicts... :: Calculating inner conflicts...

:: Conflicts found: swww-git: swww

This may be the main reason for the broken application build. You should remove all conflicting packages (currently swww, not swww-git, since it's specified in install.sh). It's advisable to clear the Pacman cache, yay and installed python dependencies and try again, but this time watch out for errors

$ yay -Scc $ sudo pacman -Scc $ pip freeze > pip.txt $ pip uninstall -r pip.txt -y $ rm pip.txt

UPD:

Thanks, I tried that but sadly I just get another TypeError. I suppose I could try another python script, though I've tried a number of them at this point. I'm using python 3.13.7

I also have this version now.

I did exactly as you suggested. I forced pip to update to the latest PyGObject, removed the swww package that was in conflict, and cleared all my yay cache.

And it installed! I've been at it for like 4 days now, and I knew it was something simple I just couldn't see. Thank you so much for your help!

Image

ggpie avatar Sep 20 '25 21:09 ggpie

You're welcome) Enjoy

xwr-ron avatar Sep 20 '25 21:09 xwr-ron