ombott error

155 views
Skip to first unread message

mauri...@gmail.com

unread,
Oct 12, 2021, 12:17:00 PM10/12/21
to py4web
Hello I got this:

File "/home/mauricewaka/py4web/py4web/server_adapters.py", line 2, in <module>
    from ombott.server_adapters import ServerAdapter
ModuleNotFoundError: No module named 'ombott'


I noted that the downloaded requirements text has:
pytest
pytest-cov
mechanize==0.4.5
python-memcached

The Github 'requirements.txt' has:
wheel
ombott >= 0.0.7
click
colorama
cryptography
tornado
renoir >= 1.4.0
requests

I'm using p4web as a local folder

Regards

Jim Steil

unread,
Oct 12, 2021, 12:23:19 PM10/12/21
to py4web
After updating to the latest did you run

python3 -m pip install --upgrade -r requirements.txt 

to install it?

-Jim

mauri...@gmail.com

unread,
Oct 12, 2021, 12:32:38 PM10/12/21
to py4web
Yes, with this error:
ERROR: Could not find a version that satisfies the requirement ombott>=0.0.7 (from versions: none)

However, after some search I noted that I'm using python 3.6.7....this could be the issue?

Regards

Val K

unread,
Oct 12, 2021, 1:39:36 PM10/12/21
to py4web
Yes, py4web requires >= python 3.7

вторник, 12 октября 2021 г. в 19:32:38 UTC+3, mauri...@gmail.com:

Maurice Waka

unread,
Oct 12, 2021, 2:42:49 PM10/12/21
to Val K, py4web
Thank you...

--
You received this message because you are subscribed to a topic in the Google Groups "py4web" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/py4web/6LsjpsS2-6M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to py4web+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/py4web/423f5586-a0fb-42bf-a30d-64c01926f77bn%40googlegroups.com.

Weemo

unread,
Oct 13, 2021, 2:31:40 PM10/13/21
to py4web
I am stuck with the same error. Using python 3.8. I am in my projects directory. Which requirements.txt should I be looking for? 


Thanks

Val K

unread,
Oct 13, 2021, 2:50:16 PM10/13/21
to py4web
 It  should be in py4web root dir, but I think that you can just copy fresh requirement.txt from git to any dir and run 
python3 -m pip install --upgrade -r requirements.txt 

среда, 13 октября 2021 г. в 21:31:40 UTC+3, Weemo:

Weemo

unread,
Oct 13, 2021, 3:01:11 PM10/13/21
to py4web
interesting. Tried that. No go. I downloaded requirements.txt out of py4web githubs.

Val K

unread,
Oct 13, 2021, 3:06:31 PM10/13/21
to py4web
Could you try 
python3 -m pip install ombott

среда, 13 октября 2021 г. в 22:01:11 UTC+3, Weemo:

Val K

unread,
Oct 13, 2021, 3:20:23 PM10/13/21
to py4web
I think that --upgrade -r requirements.txt
 is not good advice, since upgrade does not install  new packages ))))

среда, 13 октября 2021 г. в 22:06:31 UTC+3, Val K:

Val K

unread,
Oct 13, 2021, 3:23:51 PM10/13/21
to py4web
Install -r requirements.txt 
Should be enough

среда, 13 октября 2021 г. в 22:20:23 UTC+3, Val K:

Weemo

unread,
Oct 13, 2021, 4:42:57 PM10/13/21
to py4web
I keep getting 

File "/home/weemo/.local/lib/python3.8/site-packages/ombott/router/radirouter.py, Line 137, in _raise_if_registred
   raise RouteMethodError(ombott.router.errors.RouteMethodError: Handler is already registred for '[POST', 'GET', 'HEAD', 'DELETE', 'PUT']

Jim Steil

unread,
Oct 13, 2021, 5:56:56 PM10/13/21
to py4web
I had this happen too when switching to ombott.  The problem is that with bottle, you could define the route more than once. With ombott, you can't. I found that I was setting my default routes twice like this:

@action("index", method=["POST", "GET"])
@action("/", method=["POST", "GET"])

since "/" is defined when "index" is specified, it was in effect double-defining the route. I took out the second and all works.

Val probably has a much better explanation.

-Jim

Val K

unread,
Oct 13, 2021, 6:33:07 PM10/13/21
to py4web
Yes, this is ombott feature  - this guarantees that all your routes are available  (i think this is important as we are using decorators and not a centralized route table)
To overwrite existing route you can 
@action('/route/to/overwrite',  overwrite=True)

четверг, 14 октября 2021 г. в 00:56:56 UTC+3, ato....@gmail.com:
Reply all
Reply to author
Forward
0 new messages