Bench get-app a custom app error

Hi ,
i am trying to rung bench get-app for my custom app and i get the below error

ContextualVersionConflict: (oauthlib 2.1.0 (/home/frappe/frappe-bench/env/lib/python2.7/site-packages), Requirement.parse(‘oauthlib>=3.0.0’), set([‘requests-oauthlib’]))

any help?

I think you need to upgrade oauthlib version >=3.0.0

can you please let me know how to update , i am on ubuntu server 16.04

Hi @ahmedfme

try this

pip install --upgrade oauthlib

thank you,
i’ll try

1 Like

i have upgraded using
pip install --upgrade pip
pip install --upgrade oauthlib

but still have the same error

here is the the full traceback

Checking connectivity… done.
(‘installing’, u’itmos’)
INFO:bench.app:installing itmos
INFO:bench.utils:./env/bin/pip install -q -e ./apps/itmos
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
Exception:
Traceback (most recent call last):
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_internal/cli/base_command.py”, line 179, in main
status = self.run(options, args)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_internal/commands/install.py”, line 315, in run
resolver.resolve(requirement_set)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_internal/resolve.py”, line 131, in resolve
self._resolve_one(requirement_set, req)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_internal/resolve.py”, line 294, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_internal/resolve.py”, line 226, in _get_abstract_dist_for
req, self.require_hashes, self.use_user_site, self.finder,
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_internal/operations/prepare.py”, line 386, in prepare_editable_requirement
req.check_if_exists(use_user_site)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_internal/req/req_install.py”, line 402, in check_if_exists
self.req.name
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/init.py”, line 479, in get_distribution
dist = get_provider(dist)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/init.py”, line 355, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/init.py”, line 898, in require
needed = self.resolve(parse_requirements(requirements))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/init.py”, line 789, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
ContextualVersionConflict: (oauthlib 2.1.0 (/home/frappe/frappe-bench/env/lib/python2.7/site-packages), Requirement.parse(‘oauthlib>=3.0.0’), set([‘requests-oauthlib’]))
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/make.py”, line 40, in get_app
get_app(git_url, branch=branch)
File “/home/frappe/.bench/bench/app.py”, line 135, in get_app
install_app(app=app_name, bench_path=bench_path, verbose=verbose)
File “/home/frappe/.bench/bench/app.py”, line 171, in install_app
find_links=find_links))
File “/home/frappe/.bench/bench/utils.py”, line 159, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -e ./apps/itmos

Also check your pip version

pip 19.0.3 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

That one is fine.

so, what is the problem?

I’m afraid I’m not sure. Follow vinhnguyent090 recommendation. Maybe you need to add a -g for global install of the oath lib

i’ll try

Check again oauthlib version . I think you notyet upgrade to 3

pip show oauthlib

pip show oauthlib
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
Name: oauthlib
Version: 3.0.1
Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
Home-page: GitHub - oauthlib/oauthlib: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
Author: The OAuthlib Community
Author-email: idan@gazit.me
License: BSD
Location: /usr/local/lib/python2.7/dist-packages
Requires:
Required-by:

In frappe-bench folder run it

/env/bin/pip install --upgrade oauthlib

frappe@ERPNext:~/frappe-bench$ /env/bin/pip install --upgrade oauthlib
-bash: /env/bin/pip: No such file or directory
frappe@ERPNext:~/frappe-bench$ pip install --upgrade oauthlib
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already up-to-date: oauthlib in /usr/local/lib/python2.7/dist-packages (3.0.1)

. /env/bin/pip install --upgrade oauthlib

1 Like

now working…
thanks

1 Like