[web2py] Re: 'Column table.id not found (SQLTABLE)'

2018-04-24 Thread Massimo Di Pierro
strange the local pydal should take precendence over the pip installed one. 
did you change the order package import somehow?

On Friday, 20 April 2018 20:05:28 UTC-5, Brian M wrote:
>
> Thank you for mentioning this - just wasted an hour plus trying to figure 
> out why my code had stopped working only to find that it was because I'd 
> done pip install pydal for something else and foolishly not used a venv. 
> Uninstalled pydal and everything was good again. So warning to others, 
> avoid globally installing pydal
>
> On Saturday, June 3, 2017 at 11:33:17 AM UTC-5, Najtsirk wrote:
>>
>> I checked this and I had pydal installed as a global module. 
>> When I removed it web2py's DAL works ok.
>>
>>
>>
>> On Saturday, 3 June 2017 18:30:05 UTC+2, Najtsirk wrote:
>>>
>>> +1
>>> Have this problem too!
>>>
>>> On Saturday, 3 June 2017 18:13:18 UTC+2, Maurice Waka wrote:

 Hi did anyone get to solve this error? I seem to be locked in it also
 Regards

 On Monday, March 20, 2017 at 4:39:13 PM UTC+3, Santiago Cartasegna 
 wrote:
>
> Are you trying to use a table that you have defined in your database 
> and not in web2py? 
> If it is the case you must add an id field with autoincremental
>
> El domingo, 12 de marzo de 2017, 20:27:08 (UTC-3), LoveWeb2py escribió:
>>
>> Keep getting this error for all of my tables!! What is going on?
>>
>> What information would be helpful for me to post to get help?
>>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: 'Column table.id not found (SQLTABLE)'

2018-04-20 Thread Brian M
Thank you for mentioning this - just wasted an hour plus trying to figure 
out why my code had stopped working only to find that it was because I'd 
done pip install pydal for something else and foolishly not used a venv. 
Uninstalled pydal and everything was good again. So warning to others, 
avoid globally installing pydal

On Saturday, June 3, 2017 at 11:33:17 AM UTC-5, Najtsirk wrote:
>
> I checked this and I had pydal installed as a global module. 
> When I removed it web2py's DAL works ok.
>
>
>
> On Saturday, 3 June 2017 18:30:05 UTC+2, Najtsirk wrote:
>>
>> +1
>> Have this problem too!
>>
>> On Saturday, 3 June 2017 18:13:18 UTC+2, Maurice Waka wrote:
>>>
>>> Hi did anyone get to solve this error? I seem to be locked in it also
>>> Regards
>>>
>>> On Monday, March 20, 2017 at 4:39:13 PM UTC+3, Santiago Cartasegna wrote:

 Are you trying to use a table that you have defined in your database 
 and not in web2py? 
 If it is the case you must add an id field with autoincremental

 El domingo, 12 de marzo de 2017, 20:27:08 (UTC-3), LoveWeb2py escribió:
>
> Keep getting this error for all of my tables!! What is going on?
>
> What information would be helpful for me to post to get help?
>


-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: 'Column table.id not found (SQLTABLE)'

2017-06-03 Thread Najtsirk
I checked this and I had pydal installed as a global module. 
When I removed it web2py's DAL works ok.



On Saturday, 3 June 2017 18:30:05 UTC+2, Najtsirk wrote:
>
> +1
> Have this problem too!
>
> On Saturday, 3 June 2017 18:13:18 UTC+2, Maurice Waka wrote:
>>
>> Hi did anyone get to solve this error? I seem to be locked in it also
>> Regards
>>
>> On Monday, March 20, 2017 at 4:39:13 PM UTC+3, Santiago Cartasegna wrote:
>>>
>>> Are you trying to use a table that you have defined in your database and 
>>> not in web2py? 
>>> If it is the case you must add an id field with autoincremental
>>>
>>> El domingo, 12 de marzo de 2017, 20:27:08 (UTC-3), LoveWeb2py escribió:

 Keep getting this error for all of my tables!! What is going on?

 What information would be helpful for me to post to get help?

>>>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: 'Column table.id not found (SQLTABLE)'

2017-06-03 Thread Najtsirk
+1
Have this problem too!

On Saturday, 3 June 2017 18:13:18 UTC+2, Maurice Waka wrote:
>
> Hi did anyone get to solve this error? I seem to be locked in it also
> Regards
>
> On Monday, March 20, 2017 at 4:39:13 PM UTC+3, Santiago Cartasegna wrote:
>>
>> Are you trying to use a table that you have defined in your database and 
>> not in web2py? 
>> If it is the case you must add an id field with autoincremental
>>
>> El domingo, 12 de marzo de 2017, 20:27:08 (UTC-3), LoveWeb2py escribió:
>>>
>>> Keep getting this error for all of my tables!! What is going on?
>>>
>>> What information would be helpful for me to post to get help?
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: 'Column table.id not found (SQLTABLE)'

2017-06-03 Thread Maurice Waka
Hi did anyone get to solve this error? I seem to be locked in it also
Regards

On Monday, March 20, 2017 at 4:39:13 PM UTC+3, Santiago Cartasegna wrote:
>
> Are you trying to use a table that you have defined in your database and 
> not in web2py? 
> If it is the case you must add an id field with autoincremental
>
> El domingo, 12 de marzo de 2017, 20:27:08 (UTC-3), LoveWeb2py escribió:
>>
>> Keep getting this error for all of my tables!! What is going on?
>>
>> What information would be helpful for me to post to get help?
>>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: 'Column table.id not found (SQLTABLE)'

2017-03-20 Thread Santiago Cartasegna
Are you trying to use a table that you have defined in your database and 
not in web2py? 
If it is the case you must add an id field with autoincremental

El domingo, 12 de marzo de 2017, 20:27:08 (UTC-3), LoveWeb2py escribió:
>
> Keep getting this error for all of my tables!! What is going on?
>
> What information would be helpful for me to post to get help?
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: 'Column table.id not found (SQLTABLE)'

2017-03-20 Thread Peter Weicher
@LoveWeb2py

Two questions:

1) Are you running web2py from windows distribution binary or source?
2) can you view ANY other tables besides my_table in that application?

I have seen this error too, and my steps to reproduce are below. Still 
analyzing the root cause.

Here is how I reproduced this error:

1) bad install of web2py source from git. See Exhibit A. 
2) Create an application and then use signup form to add a user to the 
auth_user table.
3) try to view any table after that, I get the same KeyError citing that 
column auth_user.id does not exist in table. 
4) try the same steps from windows compiled distribution of web2py and 
everything works fine. 

I am guessing that there is some missing or misversioned library that 
creates a bad insert statement screwing up the db. 

Thanks, 
Peter 


Exhibit A - my install from source had problems.

Here is how I installed web2py from source. Because the git submodule 
update --init --recursive failed (still researching why), I instead pip'd 
pydal in and got the server running.

*Windows Command Prompt*

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\>c:\python27\python.exe c:\web2py-master\web2py.py
Traceback (most recent call last):
  File "c:\web2py-master\web2py.py", line 21, in 
import gluon.widget
  File "c:\web2py-master\gluon\__init__.py", line 31, in 
"You can also download a complete copy from http://www.web2py.com.;
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

You can also download a complete copy from http://www.web2py.com.

C:\>cd c:\web2py-master

c:\web2py-master>git submodule update --init --recursive
fatal: 'submodule' appears to be a git command, but we were not
able to execute it. Maybe git-submodule is broken?

c:\web2py-master>c:\python27\python.exe -m pip install pydal
Collecting pydal
  Using cached pyDAL-17.3-py2.py3-none-any.whl
Installing collected packages: pydal
Successfully installed pydal-17.3

On Sunday, March 12, 2017 at 6:27:08 PM UTC-5, LoveWeb2py wrote:
>
> Keep getting this error for all of my tables!! What is going on?
>
> What information would be helpful for me to post to get help?
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: 'Column table.id not found (SQLTABLE)'

2017-03-12 Thread LoveWeb2py
Error ticket for "myapp"Ticket ID

127.0.0.1.2017-03-12.21-35-27.2a6dfbe0-ddb4-43db-9e3d-e43542a6c1f2
 'Column my_table.id not found (SQLTABLE)'
Version
web2py™ Version 2.14.6-stable+timestamp.2016.05.10.00.21.47
Python Python 2.7.13: /usr/local/opt/python/bin/python2.7 (prefix: 
/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7)
Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.

Traceback (most recent call last):
  File "/code/web-dev/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
  File "/code/web-dev/web2py/applications/toplineups/views/appadmin.html" 
, line 
173, in 
{{if object_stats:}}
  File "/code/web-dev/web2py/gluon/sqlhtml.py", line 3274, in __init__
"Column %s not found (SQLTABLE)" % colname)
KeyError: 'Column nba_match.id not found (SQLTABLE)'

Error snapshot [image: help] 


('Column my_table.id not found (SQLTABLE)')

inspect attributes
Frames
   
   - 
   
   *File /code/web-dev/web2py/gluon/restricted.py in restricted at line 227*
code arguments variables
   - 
   
   *File /code/web-dev/web2py/applications/myapp/views/appadmin.html in 
at line 173* code arguments variables
   - 
   
   *File /code/web-dev/web2py/gluon/sqlhtml.py in __init__ at line 3274* 
   code arguments variables
   Function argument list
   
   (self=, sqlrows=, 
   linkto=>, upload='/myapp/appadmin/download/db', 
   orderby=True, headers={}, truncate=16, columns=['nba_match.id', 
   'my_table.field1', 'my_table.field2', 'my_table.field3', 'my_table.field4', 
   'my_table.field5', 'my_table.field6'], th_link='', extracolumns=None, 
   selectid=None, renderstyle=False, cid=None, colgroup=False, 
   **attributes={'_class': 'sortable'})
   Code listing
   
   3269.
   3270.
   3271.
   3272.
   3273.
   3274.
   
   3275.
   3276.
   3277.
   3278.
   
   r = record._extra[colname]
   row.append(TD(r))
   continue
   else:
   raise KeyError(
   "Column %s not found (SQLTABLE)" )
   
   (tablename, fieldname) = matched_column_field.groups()
   colname = tablename + '.' + fieldname
   try:
   field = sqlrows.db[tablename][fieldname]
   
   Variables
   colname 'my_table.id'
   
Context

On Sunday, March 12, 2017 at 8:30:50 PM UTC-4, Anthony wrote:
>
> On Sunday, March 12, 2017 at 7:27:08 PM UTC-4, LoveWeb2py wrote:
>>
>> Keep getting this error for all of my tables!! What is going on?
>>
>> What information would be helpful for me to post to get help?
>>
>
> The usual -- code and traceback. 
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: 'Column table.id not found (SQLTABLE)'

2017-03-12 Thread Anthony
On Sunday, March 12, 2017 at 7:27:08 PM UTC-4, LoveWeb2py wrote:
>
> Keep getting this error for all of my tables!! What is going on?
>
> What information would be helpful for me to post to get help?
>

The usual -- code and traceback. 

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.