gnebbia / kb

A minimalist command line knowledge base manager
GNU General Public License v3.0
3.17k stars 104 forks source link

AttributeError: module 'attr' has no attribute 's' #76

Closed almereyda closed 3 years ago

almereyda commented 3 years ago

Expected Behavior

kb runs.

Actual Behavior

When trying to run it, there is an error:

$ kb                            
Traceback (most recent call last):
  File "/home/yala/.local/bin/kb", line 5, in <module>
    from kb.main import main
  File "/home/yala/.local/lib/python3.8/site-packages/kb/main.py", line 19, in <module>
    from kb.commands.add import add
  File "/home/yala/.local/lib/python3.8/site-packages/kb/commands/add.py", line 19, in <module>
    import kb.db as db
  File "/home/yala/.local/lib/python3.8/site-packages/kb/db.py", line 21, in <module>
    from kb.entities.artifact import Artifact
  File "/home/yala/.local/lib/python3.8/site-packages/kb/entities/artifact.py", line 18, in <module>
    @attr.s(auto_attribs=True, frozen=True, slots=True)
AttributeError: module 'attr' has no attribute 's'

Steps to Reproduce the Problem

  1. Install with pip3 install -U kb-manager
  2. Run with kb

Specifications

xscode-auto-reply[bot] commented 3 years ago

Thanks for opening a new issue. The team has been notified and will review it as soon as possible. For urgent issues and priority support, visit https://xscode.com/gnebbia/kb

alshapton commented 3 years ago

Thanks for using kb !!

Try to force an upgrade on those packages by doing: pip install -U attr pip install -U attrs

Let us know if this fixes your problem !

almereyda commented 3 years ago

I've seen the same issue with https://github.com/MNoichl/structure_economics_2019/pull/1 lately and solved it by reverting to Python 3.7. I'll try both ways and see which one works. Of course I'd be happy to keep kb in the system environment, in so the command remains always available.

alecgirman commented 3 years ago

@alshapton This fixed the problem for me, thanks!

alshapton commented 3 years ago

Thanks for the info. A FAQ entry will be made to help out....closing

alshapton commented 3 years ago

Closed as per several users reporting FAQ entry works.

sagsai commented 2 years ago

Care to share the link of the FAQ entry? It is ovbiously not on the README.md file, the xscode.com link times out, and there is no other url anywhere! So what should someone who encounters the same problem do?

gnebbia commented 2 years ago

I guess it's something mainly depending on the version of python you are using. Which version do you currently use?

sagsai commented 2 years ago

python v3.10.7 on arch & I understand that using python v3.7 will probably fix the issue. But I would still like to see the official FAQ entry.

Closed as per several users reporting FAQ entry works.

sagsai commented 2 years ago

The following commands fixed the problem for me:

pip uninstall attr
pip uninstall attrs
pip install attrs
pip install -U kb-manager

Please consider adding that in the README.md file.

gnebbia commented 2 years ago

Ok thanks a lot for the contribution. Added to the README!