Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web2py from website or from git does not find dal #2443

Open
LukasJerabek opened this issue May 31, 2022 · 8 comments
Open

Web2py from website or from git does not find dal #2443

LukasJerabek opened this issue May 31, 2022 · 8 comments

Comments

@LukasJerabek
Copy link

LukasJerabek commented May 31, 2022

Describe the bug
Looks like a bug that was here recently with release few months ago. Web2py downloaded from official website does not include dal.

To Reproduce

  1. update to latest web2py downloading from https://mdipierro.pythonanywhere.com/examples/static/web2py_src.zip
  2. restart process.

Expected behavior
Web2py does not complain about missing dal.

Traceback

Traceback (most recent call last):
  File "~/xxx/web2py/gluon/__init__.py", line 31, in import_packages
    sys.modules[package] = __import__(package)
ModuleNotFoundError: No module named 'pydal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "~/xxx/web2py/wsgihandler.py", line 29, in <module>
    from gluon.settings import global_settings
  File "~/xxx/web2py/gluon/__init__.py", line 35, in <module>
    import_packages()
  File "~/xxx/web2py/gluon/__init__.py", line 33, in import_packages
    raise RuntimeError(MESSAGE % package)
RuntimeError: web2py depends on pydal, which apparently you have not installed.
Probably you cloned the repository using git without '--recursive'
To fix this, please run (from inside your web2py folder):

     git submodule update --init --recursive

Desktop (please complete the following information):

  • OS: centos7 (vagrant box generic/centos7 v4.0.0 (latest at time of writing))
  • Web2py version 2.22.4

Additional context
I had the same problem with git version. However when moved one commit below, problem disappeard.

@macfiron
Copy link

macfiron commented May 31, 2022

Additional information: When trying to clone the git repo or to update the submodules, dal packages fails:
either try git clone --recursive https://github.com/web2py/web2py.git
or git submodule update --init --recursive
and get:
[...]
fatal: remote error: upload-pack: not our ref 64ed5e7a7b4314b18bd9a5cf474f5c6cb7f75e77
fatal: the remote end hung up unexpectedly
Fetched in submodule path 'gluon/packages/dal', but it did not contain 64ed5e7a7b4314b18bd9a5cf474f5c6cb7f75e77. Direct fetching of that commit failed.
OS: WSL on Windows 10 Education Version 20H2 with ubuntu 20.04

@h4ttori
Copy link

h4ttori commented Jun 6, 2022

Any advance on this issue? can anybody help me to install web2py?

@jicho
Copy link
Contributor

jicho commented Jun 6, 2022

If you want you can install it by hand, just run:
pip install pydal

Or download this source:
https://mdipierro.pythonanywhere.com/examples/static/web2py_src.zip

The source is found on http://web2py.com/init/default/download under "Python 3.7" > Source Code.

Just checked and the latest zip contains the dal (and yatl) module.

@LukasJerabek
Copy link
Author

LukasJerabek commented Jun 6, 2022

Any advance on this issue? can anybody help me to install web2py?

git clone https://github.com/web2py/web2py

cd web2py

use "git checkout <commit id>" to one commit below commit with text "version 2.22.4 + pydal upgrade"

git submodule update --init --recursive

@LukasJerabek
Copy link
Author

LukasJerabek commented Jun 6, 2022

If you want you can install it by hand, just run: pip install pydal

Or download this source: https://mdipierro.pythonanywhere.com/examples/static/web2py_src.zip

The source is found on http://web2py.com/init/default/download under "Python 3.7" > Source Code.

Just checked and the latest zip contains the dal (and yatl) module.

Thats exactly what this issue is about. Thats not working.

@LukasJerabek LukasJerabek changed the title Web2py downloaded from website does not find dal Web2py from website or from git does not find dal Jun 6, 2022
@jicho
Copy link
Contributor

jicho commented Jun 6, 2022

When that's the case I would go for pip install pydal.
That always works form me.

Another advantage is that you can use the latest version whenever you want.

@LukasJerabek
Copy link
Author

LukasJerabek commented Jun 6, 2022

I did not try that this time, but last time a simillar issue was here I did and other errors rose up, with yatl and so on, I tried to install other packages that it complained about until I got to error I did not know what to dowload any more and it still did not work. But h4ttori sure can try that...

@jicho
Copy link
Contributor

jicho commented Jun 6, 2022

Okay... in my experience you need:
pip install pydal (DAL support)
pip install yatl (HTML templates)

and based on your system you might need pip install pymysql when you're using Web2Py in combination with MySQL and the module isn't already on your system.

In my case everything starts the last time I've started from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants