JonnyHaystack / i3-resurrect

Simple solution to saving and restoring i3 workspaces
GNU General Public License v3.0
379 stars 19 forks source link

Unable to run i3-resurrect #109

Closed karimone closed 2 years ago

karimone commented 2 years ago

No matter what command I run, I always get this error:

Traceback (most recent call last):
  File "/usr/bin/i3-resurrect", line 33, in <module>
    sys.exit(load_entry_point('i3-resurrect==1.4.3', 'console_scripts', 'i3-resurrect')())
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 914, in make_context
    self.parse_args(ctx, args)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1370, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 2347, in handle_parse_result
    value = self.process_value(ctx, value)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 2303, in process_value
    value = self.type_cast_value(ctx, value)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 2291, in type_cast_value
    return convert(value)
  File "/usr/lib/python3.10/site-packages/click/types.py", line 75, in __call__
    return self.convert(value, param, ctx)
  File "/usr/lib/python3.10/site-packages/click/types.py", line 846, in convert
    st = os.stat(rv)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not list

The only thing that works is the help

Here the details about the system:

JonnyHaystack commented 2 years ago

What's the command that you're running?

karimone commented 2 years ago

Any command that is not i3-resurrect shows the help it fails. It's very, very weird.

JonnyHaystack commented 2 years ago

Can you please send an example of the exact command you run that produces this error. Also did you install it using pip or from the AUR?

karimone commented 2 years ago

asciicast

karimone commented 2 years ago

Removed the i3-resurrect-git package from arch and installed the pip package on a virtualenv. It works.

JonnyHaystack commented 2 years ago

Hmm that's weird. Had you only just installed it, or was it working in the past? I found that for me it broke when there was a Python upgrade, so I had to uninstall the AUR package, wipe pacman/AUR build cache, and install it again.

karimone commented 2 years ago

I never had i3-resurrect working on my arch. I did as you suggested cleaning the pacman/aur cache with pacman -Sc && yay -Sc but still the same problem.

I'll try to debug this issue and find the proper solution

karimone commented 2 years ago

I think that the problem is my configuration for the global python. Here my pip freeze. Do you see something suspicious?

alabaster==0.7.12
alembic==1.7.4
ansible==5.3.0
ansible-core==2.12.2
apparmor==3.0.4
appdirs==1.4.4
apsw==3.36.0.post1
arandr==0.1.10
argcomplete==1.12.3
asciidoc==10.1.1
asciinema==2.1.0
asttokens==2.0.5
attrs==21.4.0
Babel==2.9.1
backcall==0.2.0
bcrypt==3.2.0
Beaker==1.11.0
beautifulsoup4==4.10.0
black==22.1.0
blinker==1.4
botocore==2.0.0.dev155
Brotli==1.0.9
brotlicffi==1.0.9.2
btrfsutil==5.16.1
CacheControl==0.12.6
cchardet==2.1.7
cffi==1.15.0
chardet==4.0.0
click==8.0.3
colorama==0.4.4
contextlib2==0.6.0.post1
cryptography==36.0.1
css-parser==1.0.6
cssselect==1.1.0
Cython==0.29.27
decorator==5.1.1
defusedxml==0.7.1
distlib==0.3.4
distro==1.6.0
dnspython==2.2.0
docopt==0.6.2
docutils==0.16
email-validator==1.1.3
evdev==1.4.0
executing==0.8.2
extras==1.0.0
feedparser==6.0.2
filelock==3.4.1
fixtures==3.0.0
Flask==2.0.2
Flask-BabelEx==0.9.4
Flask-Compress==1.8.0
Flask-Gravatar==0.5.0
Flask-Login==0.5.0
Flask-Mail==0.9.1
Flask-Migrate==3.0.0
Flask-Paranoid==0.2.0
Flask-Principal==0.4.0
Flask-Security-Too==4.0.1
Flask-SQLAlchemy==2.5.1
Flask-WTF==1.0.0
future==0.18.2
Glances==3.2.4
greenlet==1.1.2
gssapi==1.6.14
html2text==2020.1.16
html5-parser==0.4.10
html5lib==1.1
i3-resurrect==1.4.3
i3ipc==2.2.1
idna==3.3
ifaddr==0.1.7
imagesize==1.3.0
importlib-metadata==4.8.1
ipdb==0.13.9
ipython==8.0.1
ipython-genutils==0.2.0
itsdangerous==2.0.1
jedi==0.18.1
jeepney==0.7.1
Jinja2==3.0.3
jmespath==0.10.0
keyutils==0.6
ldap3==2.9
lensfun==0.3.95
LibAppArmor==3.0.4
louis==3.20.0
lutris==0.5.9.1
lxml==4.7.1
Mako==1.1.6
Markdown==3.3.6
MarkupSafe==2.0.1
matplotlib-inline==0.1.3
mechanize==0.4.6
meson==0.61.2
Mimeo==2021.11.20.2.28.56
more-itertools==8.10.0
msgpack==1.0.3
multivolumefile==0.2.3
mypy-extensions==0.4.3
natsort==8.1.0
netifaces==0.11.0
numpy==1.22.2
ordered-set==4.0.2
packaging==20.9
paramiko==2.9.2
parso==0.8.2
passlib==1.7.4
pathspec==0.9.0
pbr==5.8.1
pep517==0.12.0
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.0.1
platformdirs==2.4.1
ply==3.11
progress==1.6
prompt-toolkit==3.0.28
psutil==5.9.0
psycopg2==2.9.3
ptyprocess==0.7.0
pulsemixer==1.5.1
pure-eval==0.2.2
py7zr==0.16.2
pyasn1==0.4.8
pycairo==1.20.1
pychm==0.8.6
pycparser==2.21
pycryptodome==3.14.1
pycryptodomex==3.10.1
Pygments==2.11.2
PyGObject==3.42.0
PyMuPDF==1.19.5
PyNaCl==1.4.0
PyOpenGL==3.1.5
pyOpenSSL==21.0.0
pyparsing==2.4.7
pyppmd==0.17.1
PyQt5==5.15.6
PyQt5-sip==12.9.1
PyQtWebEngine==5.15.5
python-dateutil==2.8.2
python-editor==1.0.4
python-xlib==0.31
pytz==2021.3
pyudev==0.22.0.dev20211202
pyxdg==0.27
PyYAML==5.4.1
pyzstd==0.15.0
ranger-fm==1.9.3
Reflector==2021.11.20.2.41.3
regex==2021.11.10
requests==2.27.0
resolvelib==0.5.5
retrying==1.3.3
ruamel.yaml==0.17.21
ruamel.yaml.clib==0.2.6
Rx==3.2.0
s3transfer==0.5.0
sgmllib3k==1.0.0
shtab==1.5.3
simplejson==3.17.6
six==1.16.0
snowballstemmer==2.2.0
solaar==1.1.1
soupsieve==2.3
speaklater==1.3
speedtest-cli==2.1.3
Sphinx==4.4.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
SQLAlchemy==1.3.24
sqlparse==0.4.2
sshtunnel==0.4.0
stack-data==0.2.0
stevedore==3.5.0
TBB==0.2
team==1.0
termcolor==1.1.0
testtools==2.5.0
texttable==1.6.4
tldr==3.0.0
toml==0.10.2
tomli==2.0.0
traitlets==5.1.1
typing-extensions==4.1.0
ueberzug==18.1.9
unrardll==0.1.4
urllib3==1.26.8
virtualenv==20.11.0
virtualenv-clone==0.5.7
virtualenvwrapper==4.8.4
wcwidth==0.2.5
webencodings==0.5.1
Werkzeug==2.0.2
WTForms==2.3.3
xdot==1.2
xmltodict==0.12.0
youtube-dl==2021.12.17
zeroconf==0.38.2
zipp==3.7.0
takinoy commented 2 years ago

Hello, I've experienced the same issue. That seem to be related to the config file ~/.config/i3-resurrect/config.json Directory is stored on list and click seems to expect a string.... Edit the file and try to remove bracket in "directory": ["~/.i3/i3-resurrect/"], to "directory": "~/.i3/i3-resurrect/", That worked for me at least.

JonnyHaystack commented 2 years ago

Oh wow, yeah that's definitely wrong. Not sure how that's been there for so long and not been an issue until now. Will fix now.

JonnyHaystack commented 2 years ago

Resolved by 2ec5b6d