kalliope-project / kalliope

Kalliope is a framework that will help you to create your own personal assistant.
https://kalliope-project.github.io/
GNU General Public License v3.0
1.72k stars 228 forks source link

Error when starting Kalliope #670

Closed gabrielcolon32 closed 3 years ago

gabrielcolon32 commented 3 years ago

It seems to be a problem with the Werkzeug package. I had to install kalliope from this branch because I was getting the same error on the main one. Note: I am using Ubuntu 20.04

Traceback (most recent call last): File "/home/gabriel/Documents/Kalliope/kalliope/venv/bin/kalliope", line 33, in sys.exit(load_entry_point('kalliope==0.7.1', 'console_scripts', 'kalliope')()) File "/home/gabriel/Documents/Kalliope/kalliope/venv/bin/kalliope", line 25, in importlib_load_entry_point return next(matches).load() File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load module = import_module(match.group('module')) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 848, in exec_module File "", line 219, in _call_with_frames_removed File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/kalliope-0.7.1-py3.8.egg/kalliope/init.py", line 12, in from flask import Flask File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/Flask-2.0.2-py3.8.egg/flask/init.py", line 7, in from .app import Flask as Flask File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/Flask-2.0.2-py3.8.egg/flask/app.py", line 19, in from werkzeug.local import ContextVar ImportError: cannot import name 'ContextVar' from 'werkzeug.local' (/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/Werkzeug-0.16.1-py3.8.egg/werkzeug/local.py)

Sispheor commented 3 years ago

Dev branch?

gabrielcolon32 commented 3 years ago

Yes, I was told to clone the project from there because it might have been fixed. But it seems that there is still an issue.

Context: https://gitter.im/kalliope-project/Lobby

Sispheor commented 3 years ago

You have reinstalled after checking out the branch?

gabrielcolon32 commented 3 years ago

I just cloned the branch and installed it


gabriel@gabriel-VirtualBox:~/Documents/Kalliope$ git clone https://github.com/kalliope-project/kalliope.git
Cloning into 'kalliope'...
remote: Enumerating objects: 11852, done.
remote: Counting objects: 100% (435/435), done.
remote: Compressing objects: 100% (161/161), done.
remote: Total 11852 (delta 193), reused 357 (delta 144), pack-reused 11417
Receiving objects: 100% (11852/11852), 20.35 MiB | 988.00 KiB/s, done.
Resolving deltas: 100% (7618/7618), done.
gabriel@gabriel-VirtualBox:~/Documents/Kalliope$ cd kalliope/
gabriel@gabriel-VirtualBox:~/Documents/Kalliope/kalliope$ virtualenv venv -p /usr/bin/python3

created virtual environment CPython3.8.10.final.0-64 in 1049ms
  creator CPython3Posix(dest=/home/gabriel/Documents/Kalliope/kalliope/venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/gabriel/.local/share/virtualenv)
    added seed packages: pip==21.3.1, setuptools==58.3.0, wheel==0.37.0
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
gabriel@gabriel-VirtualBox:~/Documents/Kalliope/kalliope$ 
gabriel@gabriel-VirtualBox:~/Documents/Kalliope/kalliope$ source venv/bin/activate
(venv) gabriel@gabriel-VirtualBox:~/Documents/Kalliope/kalliope$ python3 setup.py install
running install

...
Sispheor commented 3 years ago

Delete your venv and reinstall

gabrielcolon32 commented 3 years ago

Without the venv or just do the same process?

Sispheor commented 3 years ago

Create a new venv

gabrielcolon32 commented 3 years ago

Installed /home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/itsdangerous-2.0.1-py3.8.egg error: Werkzeug 0.16.1 is installed but Werkzeug>=2.0 is required by {'Flask', 'flask'}

gabrielcolon32 commented 3 years ago

Traceback (most recent call last): File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 583, in _build_master ws.require(requires) File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 900, in require needed = self.resolve(parse_requirements(requirements)) File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 791, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (Werkzeug 0.16.1 (/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages), Requirement.parse('Werkzeug>=2.0'), {'flask', 'Flask'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/gabriel/Documents/Kalliope/kalliope/venv/bin/kalliope", line 6, in from pkg_resources import load_entry_point File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 3252, in def _initialize_master_working_set(): File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 3235, in _call_aside f(*args, **kwargs) File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 3264, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 585, in _build_master return cls._build_from_requirements(requires) File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 598, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 791, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (Werkzeug 0.16.1 (/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages), Requirement.parse('Werkzeug>=2.0'), {'flask', 'Flask'})

Sispheor commented 3 years ago

Are you sure you are on the dev branch? Because the version of this package is >= 2.0 in the requirements file.

gabrielcolon32 commented 3 years ago

If I install the 2.0 version I get this error:

Traceback (most recent call last): File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 583, in _build_master ws.require(requires) File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 900, in require needed = self.resolve(parse_requirements(requirements)) File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 791, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (Werkzeug 2.0.0 (/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages), Requirement.parse('Werkzeug==0.16.1'), {'kalliope'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/gabriel/Documents/Kalliope/kalliope/venv/bin/kalliope", line 6, in from pkg_resources import load_entry_point File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 3252, in def _initialize_master_working_set(): File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 3235, in _call_aside f(*args, **kwargs) File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 3264, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 585, in _build_master return cls._build_from_requirements(requires) File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 598, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/home/gabriel/Documents/Kalliope/kalliope/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 786, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'Werkzeug==0.16.1' distribution was not found and is required by kalliope

Sispheor commented 3 years ago

Werkzeug==0.16.1 You are still on the master branch...

gabrielcolon32 commented 3 years ago

image

Sispheor commented 3 years ago

This is a screenshot. Not related to your actual repo on your workstation. How did you switch to the dev branch?

Sispheor commented 3 years ago

Omg, you've set "dev" on GitHub and then clone? Right?

gabrielcolon32 commented 3 years ago

Oh 0_0

Whoops

Sispheor commented 3 years ago

Omg. I can't believe it. You just made my day. Thank you. You are a software engineer student? Really?

gabrielcolon32 commented 3 years ago

I'm still learning... I thought I could just clone a branch. They didn't teach me this so..

gabrielcolon32 commented 3 years ago

Thanks for making fun of it instead of helping...

Sispheor commented 3 years ago

I think I already went far in this support. You started by coming here with a "hey! Is this project fill my needs?" Without reading a single line of the main readme. I still spent time to dig into your issue to finally find out that the problem was your usage of git. So now go google to find out how to switch branch. I really recommend you to take time to learn git and GitHub usage before submitting issues on repositories. Some project owner may not be that patient with you. Good luck young Padawan!