gitfetch icon indicating copy to clipboard operation
gitfetch copied to clipboard

Python Error

Open Envexus opened this issue 1 year ago • 7 comments

Installed through AUR, went through the setup process and is coming out with the following error.

Error: Python int too large to convert to C int

Anything im doing wrong?

Envexus avatar Oct 26 '25 14:10 Envexus

@Envexus Could you tell me if you can compile it locally? Not sure if its compatibility or package related issue

git clone https://github.com/Matars/gitfetch.git
cd gitfetch
make dev
gitfetch

Matars avatar Oct 26 '25 14:10 Matars

Same issue, anything you need from me that could help diagnose the issue?

Envexus avatar Oct 26 '25 14:10 Envexus

@Envexus yes please, could you

cd gitfech
git checkout COverflow
make dev
GITFETCH_DEBUG=1 gitfetch

And let me know if its any different output?

Matars avatar Oct 26 '25 15:10 Matars

┌──(joshua@envexus)-[~/gitfetch]
└─ (COverflow)$ GITFETCH_DEBUG=1 gitfetch
Traceback (most recent call last):
  File "/home/joshua/gitfetch/src/gitfetch/cli.py", line 397, in main
    user_data = cache_manager.get_cached_user_data(username)
  File "/home/joshua/gitfetch/src/gitfetch/cache.py", line 62, in get_cached_user_data
    entry = self.get_cached_entry(username)
  File "/home/joshua/gitfetch/src/gitfetch/cache.py", line 105, in get_cached_entry
    if self._is_cache_expired(cached_at):
       ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/joshua/gitfetch/src/gitfetch/cache.py", line 258, in _is_cache_expired
    expiry_time = datetime.now() - timedelta(minutes=self.cache_expiry_minutes)
                                   ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OverflowError: Python int too large to convert to C int

Envexus avatar Oct 26 '25 15:10 Envexus

@Envexus, added some extra guardians around cache time calculation, defaults to cache expired of errors, let me know if there are any other issues you might encounter (I assume you're on 32-bit system which has not been tested im pretty sure)

cd gitfetch
git pull
make dev
GITFETCH_DEBUG=1 gitfetch

Matars avatar Oct 26 '25 15:10 Matars

This works, and im using a 64-bit system

Envexus avatar Oct 26 '25 15:10 Envexus

Hm, anyways, thanks for finding this bug. much appreciated.

This branch will be merged to main and realese 1.3.1 will come in a couple of minutes, if you stil want to install it as a package :)

EDIT: I meant v1.3.2

Matars avatar Oct 26 '25 15:10 Matars