pycharm and web2py - setup project

463 views
Skip to first unread message

Kirill Shatalaev

unread,
Aug 8, 2017, 5:18:35 PM8/8/17
to web...@googlegroups.com
Hello, I have Pycharm 2017.2 (Professional version).

And autocompletion and Parameter info (ctrl+p) does not work out of the box for DAL methods and functions (like, for example, define_table).

But, when I install pyDAL package on my project interpreter options, it works (see attached screenshot).

This is not the right way: using pydal as a separate package; this causes troubles. For example, 2.15.3 web2py crashing on start if pyDAL is installed to my venv as additional package.

What can I do to make autocompletion and parameter info usable?
interpreter.png

Richard Vézina

unread,
Aug 10, 2017, 9:47:42 AM8/10/17
to web2py-users
Have you try with python 2.7 if it works... And are you using the pycharm project creation tool to configure your web2py environnement?? You can try with their tool before trying to make it work with virtual environnement...

Richard

On Tue, Aug 8, 2017 at 5:18 PM, Kirill Shatalaev <k...@zombiehost.net> wrote:
Hello, I have Pycharm 2017.2 (Professional version).

And autocompletion and Parameter info (ctrl+p) does not work out of the box for my project.

But, when I install pyDAL package on my project interpreter options, and it starts to work (see attached screenshot).

This is not the right way: using pydal as a separate package; this causes troubles. For example, 2.15.3 web2py crashing on start if pyDAL is installed to my venv as additional package.

What can I do to make autocompletion and parameter info usable?

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kirill Shatalaev

unread,
Aug 10, 2017, 1:20:10 PM8/10/17
to web2py-users
Just tried with python 2.7, it creates new project from scratch and downloads web2py automatically. Still no autocomplete and parameters.

четверг, 10 августа 2017 г., 17:47:42 UTC+4 пользователь Richard написал:
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
pycharm1.png
pycharm2.png

Richard Vézina

unread,
Aug 10, 2017, 2:07:43 PM8/10/17
to web2py-users
You may consider looking here if it a known bug and report it if not : https://youtrack.jetbrains.com/issues/PY

To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.

Richard Vézina

unread,
Aug 10, 2017, 2:12:29 PM8/10/17
to web2py-users
I guess it related to the refactoring that occur around importing stuff in web2py which was particular... It has been reworked in version 2.15.x

You may have a look at the web2py repo for having a look at how it change...

We should inform PyCharm devs about this change if the issue is coming from there, which I kind of pretty sure thinking about it...

Richard

Kirill Shatalaev

unread,
Aug 10, 2017, 4:32:51 PM8/10/17
to web2py-users
I created an issue, but I m afraid web2py is not their main stream...

четверг, 10 августа 2017 г., 22:07:43 UTC+4 пользователь Richard написал:

Richard

unread,
Aug 11, 2017, 9:44:48 AM8/11/17
to web2py-users
Good, could you maybe try with python 2.14.6 if it works, just to be sure that web2py 2.15.x series trigger the issue...

I think they are just not aware of the web2py modifications (if it the rigth reason of the issue), they have a lot on their plate and yes I guess web2py support could maybe not their major source of revenue... But they have a really good reputation and their product are wonderful.

Richard

Richard Vézina

unread,
Aug 11, 2017, 9:57:46 AM8/11/17
to web2py-users
Kirill, I just try to create a new project and the autocompletion was working, so I guess the issue is limited to virtual environement...

To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.

Ben Lawrence

unread,
Aug 12, 2017, 1:40:11 PM8/12/17
to web2py-users
pycharm and wingIDE are different from Bbedit and sublimetext. bbedit and sublimetext have auto-complete out of the box, just by loading your files into a project, but for pycharm and wingIDE you have to muck around with the options etc. 

Kirill Shatalaev

unread,
Aug 14, 2017, 5:11:45 AM8/14/17
to web2py-users
Richard, how did you do that?

This is my scrincast on a clean installation and without any virtual environment. Does not work.

https://youtu.be/51mmwUSJ_VM


пятница, 11 августа 2017 г., 17:57:46 UTC+4 пользователь Richard написал:

Richard Vézina

unread,
Aug 14, 2017, 9:21:45 AM8/14/17
to web2py-users
hmm... I don't understand why you say it not working... Once the pycharm indexing end, at the end of your vid you have autocomplete working no???

I do have last pycharm version 

PyCharm 2017.2
Build #PY-172.3317.103, built on July 25, 2017
JRE: 1.8.0_152-release-915-b5 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.4.0-89-generic

Richard

Richard Vézina

unread,
Aug 14, 2017, 9:22:39 AM8/14/17
to web2py-users
Also, do you have professional version of pycharm (you seems too)?

Kirill Shatalaev

unread,
Aug 14, 2017, 4:51:54 PM8/14/17
to web2py-users
Richard, as you can see at 2:20, parameter info is NOT working (indexing is finished, view->parameter info or ctrl+p is not working too)
After that I've added pyDAL package (2:43)
And ONLY then it starting to work, yes (3:26).

Pycharm is professional version, 2017.2.1

понедельник, 14 августа 2017 г., 17:21:45 UTC+4 пользователь Richard написал:
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.

Richard Vézina

unread,
Aug 15, 2017, 10:08:00 AM8/15/17
to web2py-users
Ok, I confirm, I did have to install pyDAL too in order to allow autocompletion of db.define_table...

I use to test in controller and it was working with request... Not sure why...

I guess this is cause by the fact that pyDAL is a external product since sometimes and PyCharm didn't address this change...

Richard

To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.

Richard Vézina

unread,
Aug 16, 2017, 10:03:46 PM8/16/17
to web2py-users
Real don't like needing to install pyDAL as pycharm install it in python packages with pip... so you end with a specific version of pyDAL install with kind of override your web2py included instance if the version is superior to the version of web2py you work with... I just spent quite some times figure out why I had weird trace back error that I never had before searching where it was coming from... Until I recall that I had install the pyDAL with pycharm... I un install it with pip then dam dam, work as expected...

So for sure someone would better use virtual environment... I recall having trying to configure pycharm project within venv, I think there is tool to do so in pycharm I don't regularly use venv...

I would say never install pyDAL with pip without venv...

Richard
Reply all
Reply to author
Forward
0 new messages