I guess if you can't replicate, the full error might be helpful:
ERROR 2017-05-02 02:36:08,394 restricted.py:171] Traceback (most recent
call last):
File "/Users/sin/Dev/Trytha/web2py/gluon/restricted.py", line 216, in
restricted
exec(ccode, environment)
File "/Users/sin/Dev/Trytha/web2py/applications/welcome/models/db.py",
line 40, in <module>
db = DAL('google:sql://trytha-1104:test4/test4')
File "/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/base.py",
line 170, in __call__
obj = super(MetaDAL, cls).__call__(*args, **kwargs)
File "/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/base.py",
line 475, in __init__
"Failure to connect, tried %d times:\n%s" % (attempts, tb)
RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
File "/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/base.py",
line 455, in __init__
self._adapter = adapter(**kwargs)
File
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/__init__.py"
, line 40, in __call__
obj = super(AdapterMeta, cls).__call__(*args, **kwargs)
File
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/google.py",
line 40, in __init__
super(GoogleSQL, self).__init__(*args, **kwargs)
File
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 367, in __init__
super(SQLAdapter, self).__init__(*args, **kwargs)
File
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 50, in __init__
self._initialize_(do_connect)
File
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/google.py",
line 49, in _initialize_
super(MySQL, self)._initialize_(do_connect)
File
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/base.py",
line 63, in _initialize_
self._find_work_folder()
File
"/Users/sin/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/google.py",
line 44, in _find_work_folder
super(GoogleSQL)._find_work_folder()
AttributeError: 'super' object has no attribute '_find_work_folder'
I'll see if I can get everything working in a different environment.
On Monday, May 1, 2017 at 6:51:42 PM UTC-7, Dave S wrote:
>
>
>
> On Monday, May 1, 2017 at 6:09:42 PM UTC-7, [email protected] wrote:
>>
>> I could zip that up into an app if you like, but I can literally change
>> any portion of that connection string and have it work in the old version
>> of pydal and not work in the new version (in a completely fresh web2py
>> install which I performed while I wrote the steps to replicate). This is
>> also a shiny, fresh OSX install, so I can't see this being some sort of
>> interaction specific to my computer.
>>
>>
> Ok, fair enough.
>
> /dps
>
>
>
>
>> On Monday, May 1, 2017 at 5:56:14 PM UTC-7, [email protected] wrote:
>>>
>>> The steps are kinda simple:
>>>
>>> 1. Install web2py:
>>> git clone --recursive https://github.com/web2py/web2py.git
>>>
>>>
>>> 2. Move gaehandler.py and app.yaml into the web2py directory.
>>>
>>> 3. In the Welcome app, change the GAE connection string in db.py to:
>>> db = DAL('google:sql://[$project]:[$instance]/[$database]')
>>>
>>> 4. Run GAE from command prompt:
>>>
>>> python /Dev/Trytha/google-cloud-sdk/bin/dev_appserver.py --host=0.0.0.0
>>> --mysql_host=localhost --mysql_port=3306 --mysql_user=root --
>>> mysql_password='[$password]' /Dev/Trytha/web2py
>>>
>>> 5. At this point, the Welcome app gives the error I just posted where
>>> super() doesn't have _find_work_folder() but if you change just pydal to a
>>> working version (2.12.2, for instance), it will work fine. Don't even need
>>> to relaunch anything, you can just hot swap between broken and working
>>> versions of pydal (how I found the specific commit that broke everything).
>>>
>>>
>>> On Monday, May 1, 2017 at 5:29:55 PM UTC-7, Dave S wrote:
>>>>
>>>>
>>>>
>>>> On Monday, May 1, 2017 at 4:30:59 PM UTC-7, [email protected] wrote:
>>>>>
>>>>> Here is the error from the current version of pydal when trying to
>>>>> connect to Cloud SQL (my memory is better than I thought):
>>>>>
>>>>> File
>>>>> "/Dev/Trytha/web2py/gluon/packages/dal/pydal/adapters/google.py",
>>>>> line 44, in _find_work_folder
>>>>>
>>>>> super(GoogleSQL)._find_work_folder()
>>>>>
>>>>> AttributeError: 'super' object has no attribute '_find_work_folder'
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> If I read the other thread correctly, Massimo couldn't reproduce your
>>>> error (and AIUI, he uses GAE in his own projects). Do you have a sample
>>>> app that shows the error?
>>>>
>>>> /dps
>>>>
>>>>
>>>>
>>>>
>>>>> On Monday, May 1, 2017 at 8:56:47 AM UTC-7, [email protected] wrote:
>>>>>>
>>>>>> Ah, I think the problem might actually be slightly different, but the
>>>>>> solution is the same. If I recall correctly, the error I was getting
>>>>>> said
>>>>>> something about super() not having a method called something like
>>>>>> _find_work_folder(). I can give you the exact error when I get home
>>>>>> later
>>>>>> today.
>>>>>>
>>>>>> On Monday, May 1, 2017 at 8:53:01 AM UTC-7, [email protected] wrote:
>>>>>>>
>>>>>>> Same problems as I detailed on this thread:
>>>>>>>
>>>>>>> https://groups.google.com/forum/#!topic/web2py/XsSvnbGzzws
>>>>>>>
>>>>>>> Basically, it seems like it was fixed and then immediately broken
>>>>>>> again. The commit I mention above is the one where it was broken again.
>>>>>>>
>>>>>>> On Monday, May 1, 2017 at 7:21:12 AM UTC-7, Massimo Di Pierro wrote:
>>>>>>>>
>>>>>>>> Can you provide a quick summary of the problem you are having with
>>>>>>>> Cloud SQL?
>>>>>>>> I will make it a priority to fix it.
>>>>>>>>
>>>>>>>> On Sunday, 30 April 2017 18:47:19 UTC-5, [email protected] wrote:
>>>>>>>>>
>>>>>>>>> Figured this should have a new topic because it's been a year
>>>>>>>>> without two massive bugs being addressed. The last version of DAL
>>>>>>>>> that
>>>>>>>>> fully works with Cloud SQL I'm aware of is 2.12.2... Yes, it's been
>>>>>>>>> broken
>>>>>>>>> THAT long.
>>>>>>>>>
>>>>>>>>> To get Cloud SQL working, you have to replace pydal in gluon with
>>>>>>>>> an older version (16.03 works but was immediately broken by a commit
>>>>>>>>> on the
>>>>>>>>> same day).
>>>>>>>>>
>>>>>>>>> I went through github and this seems to be the last commit that
>>>>>>>>> broke Cloud SQL (the version of pydal from the previous commit seems
>>>>>>>>> to
>>>>>>>>> work fine):
>>>>>>>>> https://github.com/web2py/pydal/commit/4fee2923db00763c4a4666c5ad0e5c1104e8f24a
>>>>>>>>>
>>>>>>>>> Also, my post at the following link is the only way to get lost
>>>>>>>>> password requests working on GAE right now:
>>>>>>>>> https://groups.google.com/forum/#!topic/web2py/YndwuzoEypw
>>>>>>>>>
>>>>>>>>> Could one of the mods mark my final answer on that link as "best
>>>>>>>>> answer" since I can't do it on my own post?
>>>>>>>>>
>>>>>>>>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.