[web2py] Re: importing issues
Yes On Saturday, December 1, 2012 10:57:45 AM UTC-8, Massimo Di Pierro wrote: > > Did you restart web2py/web server? > > On Friday, 30 November 2012 15:07:26 UTC-6, Maggs wrote: >> >> Hm, ok, that makes sense. However I have changed the name of the module >> within my app and restart web2py but I'm still getting the same error. >> Now the case is: >> site-packages/mymodule/a.py >> site-packages/mymodule/b.py >> applications/myapp/modules/c.py >> >> a.py imports b.py and is saying it does not have the attribute >> 'function'. >> I have tried explicitly naming the package.module within a.py (import >> mymodule.b.py as opposed to just import b.py) but that made no >> difference. >> >> On Friday, November 30, 2012 12:10:29 PM UTC-8, Massimo Di Pierro wrote: >>> >>> consider this case: >>> >>> site-packages/mymodule/a.py >>> site-packages/mymodule/b.py >>> applications/myapp/modules/b.py >>> >>> if myapp "import mymodule.a" and a.py "import b" this worked fine before >>> but does not work in 2.2. This because the latest web2py has a custom >>> import that always looks first in myapp/modules/ >>> >>> technically it is a bug in mymodule/a.py which should not >>> >>> import .b >>> >>> and not >>> >>> import b >>> >>> since the module does not know what is the path. >>> >>> >>> On Friday, 30 November 2012 12:32:16 UTC-6, Maggs wrote: Yes and this is what I was curious about. I do have a utility module under myapp/modules/, however this cm module is calling it's own utility module completely outside of my app, so I don't understand how it could be getting them confused. This was never an issues in 1.99. I will try changing the name of the utility module inside my app and see if it helps though. Thanks! On Friday, November 30, 2012 6:37:41 AM UTC-8, Massimo Di Pierro wrote: > > Do you have anything under yourapp/modules/? > > On Thursday, 29 November 2012 17:30:30 UTC-6, Maggs wrote: >> >> I recently upgraded to web2py 2.2.1 from 1.99. I have an external set >> of modules that I am importing into my application. Since I updated to >> 2.2.1 I am getting errors saying that the module does not have the >> attribute 'function'. >> To explain further, I have an external set of modules under the >> folder cmweb. This folder is in my python path. I have from cmweb import >> cm >> at the top of my controller. Within the cm module, a module called >> utility >> is being imported. This module is also inside the cmweb folder. Now when >> I >> call functions from the cm module, I am getting an error saying that the >> utility module has no attribute 'function'. This was not happening >> before I >> upgraded to 2.2.1. Any ideas what might be happening here? >> >> Thanks in advance. >> > --
[web2py] Re: importing issues
Did you restart web2py/web server? On Friday, 30 November 2012 15:07:26 UTC-6, Maggs wrote: > > Hm, ok, that makes sense. However I have changed the name of the module > within my app and restart web2py but I'm still getting the same error. > Now the case is: > site-packages/mymodule/a.py > site-packages/mymodule/b.py > applications/myapp/modules/c.py > > a.py imports b.py and is saying it does not have the attribute 'function'. > I have tried explicitly naming the package.module within a.py (import > mymodule.b.py as opposed to just import b.py) but that made no difference. > > On Friday, November 30, 2012 12:10:29 PM UTC-8, Massimo Di Pierro wrote: >> >> consider this case: >> >> site-packages/mymodule/a.py >> site-packages/mymodule/b.py >> applications/myapp/modules/b.py >> >> if myapp "import mymodule.a" and a.py "import b" this worked fine before >> but does not work in 2.2. This because the latest web2py has a custom >> import that always looks first in myapp/modules/ >> >> technically it is a bug in mymodule/a.py which should not >> >> import .b >> >> and not >> >> import b >> >> since the module does not know what is the path. >> >> >> On Friday, 30 November 2012 12:32:16 UTC-6, Maggs wrote: >>> >>> Yes and this is what I was curious about. I do have a utility module >>> under myapp/modules/, however this cm module is calling it's own utility >>> module completely outside of my app, so I don't understand how it could be >>> getting them confused. This was never an issues in 1.99. I will try >>> changing the name of the utility module inside my app and see if it helps >>> though. >>> >>> Thanks! >>> >>> On Friday, November 30, 2012 6:37:41 AM UTC-8, Massimo Di Pierro wrote: Do you have anything under yourapp/modules/? On Thursday, 29 November 2012 17:30:30 UTC-6, Maggs wrote: > > I recently upgraded to web2py 2.2.1 from 1.99. I have an external set > of modules that I am importing into my application. Since I updated to > 2.2.1 I am getting errors saying that the module does not have the > attribute 'function'. > To explain further, I have an external set of modules under the folder > cmweb. This folder is in my python path. I have from cmweb import cm at > the > top of my controller. Within the cm module, a module called utility is > being imported. This module is also inside the cmweb folder. Now when I > call functions from the cm module, I am getting an error saying that the > utility module has no attribute 'function'. This was not happening before > I > upgraded to 2.2.1. Any ideas what might be happening here? > > Thanks in advance. > --
[web2py] Re: importing issues
Hm, ok, that makes sense. However I have changed the name of the module within my app and restart web2py but I'm still getting the same error. Now the case is: site-packages/mymodule/a.py site-packages/mymodule/b.py applications/myapp/modules/c.py a.py imports b.py and is saying it does not have the attribute 'function'. I have tried explicitly naming the package.module within a.py (import mymodule.b.py as opposed to just import b.py) but that made no difference. On Friday, November 30, 2012 12:10:29 PM UTC-8, Massimo Di Pierro wrote: > > consider this case: > > site-packages/mymodule/a.py > site-packages/mymodule/b.py > applications/myapp/modules/b.py > > if myapp "import mymodule.a" and a.py "import b" this worked fine before > but does not work in 2.2. This because the latest web2py has a custom > import that always looks first in myapp/modules/ > > technically it is a bug in mymodule/a.py which should not > > import .b > > and not > > import b > > since the module does not know what is the path. > > > On Friday, 30 November 2012 12:32:16 UTC-6, Maggs wrote: >> >> Yes and this is what I was curious about. I do have a utility module >> under myapp/modules/, however this cm module is calling it's own utility >> module completely outside of my app, so I don't understand how it could be >> getting them confused. This was never an issues in 1.99. I will try >> changing the name of the utility module inside my app and see if it helps >> though. >> >> Thanks! >> >> On Friday, November 30, 2012 6:37:41 AM UTC-8, Massimo Di Pierro wrote: >>> >>> Do you have anything under yourapp/modules/? >>> >>> On Thursday, 29 November 2012 17:30:30 UTC-6, Maggs wrote: I recently upgraded to web2py 2.2.1 from 1.99. I have an external set of modules that I am importing into my application. Since I updated to 2.2.1 I am getting errors saying that the module does not have the attribute 'function'. To explain further, I have an external set of modules under the folder cmweb. This folder is in my python path. I have from cmweb import cm at the top of my controller. Within the cm module, a module called utility is being imported. This module is also inside the cmweb folder. Now when I call functions from the cm module, I am getting an error saying that the utility module has no attribute 'function'. This was not happening before I upgraded to 2.2.1. Any ideas what might be happening here? Thanks in advance. >>> --
[web2py] Re: importing issues
consider this case: site-packages/mymodule/a.py site-packages/mymodule/b.py applications/myapp/modules/b.py if myapp "import mymodule.a" and a.py "import b" this worked fine before but does not work in 2.2. This because the latest web2py has a custom import that always looks first in myapp/modules/ technically it is a bug in mymodule/a.py which should not import .b and not import b since the module does not know what is the path. On Friday, 30 November 2012 12:32:16 UTC-6, Maggs wrote: > > Yes and this is what I was curious about. I do have a utility module under > myapp/modules/, however this cm module is calling it's own utility module > completely outside of my app, so I don't understand how it could be getting > them confused. This was never an issues in 1.99. I will try changing the > name of the utility module inside my app and see if it helps though. > > Thanks! > > On Friday, November 30, 2012 6:37:41 AM UTC-8, Massimo Di Pierro wrote: >> >> Do you have anything under yourapp/modules/? >> >> On Thursday, 29 November 2012 17:30:30 UTC-6, Maggs wrote: >>> >>> I recently upgraded to web2py 2.2.1 from 1.99. I have an external set of >>> modules that I am importing into my application. Since I updated to 2.2.1 I >>> am getting errors saying that the module does not have the attribute >>> 'function'. >>> To explain further, I have an external set of modules under the folder >>> cmweb. This folder is in my python path. I have from cmweb import cm at the >>> top of my controller. Within the cm module, a module called utility is >>> being imported. This module is also inside the cmweb folder. Now when I >>> call functions from the cm module, I am getting an error saying that the >>> utility module has no attribute 'function'. This was not happening before I >>> upgraded to 2.2.1. Any ideas what might be happening here? >>> >>> Thanks in advance. >>> >> --
[web2py] Re: importing issues
Renaming the utility module within the app did not help. On Friday, November 30, 2012 10:32:16 AM UTC-8, Maggs wrote: > > Yes and this is what I was curious about. I do have a utility module under > myapp/modules/, however this cm module is calling it's own utility module > completely outside of my app, so I don't understand how it could be getting > them confused. This was never an issues in 1.99. I will try changing the > name of the utility module inside my app and see if it helps though. > > Thanks! > > On Friday, November 30, 2012 6:37:41 AM UTC-8, Massimo Di Pierro wrote: >> >> Do you have anything under yourapp/modules/? >> >> On Thursday, 29 November 2012 17:30:30 UTC-6, Maggs wrote: >>> >>> I recently upgraded to web2py 2.2.1 from 1.99. I have an external set of >>> modules that I am importing into my application. Since I updated to 2.2.1 I >>> am getting errors saying that the module does not have the attribute >>> 'function'. >>> To explain further, I have an external set of modules under the folder >>> cmweb. This folder is in my python path. I have from cmweb import cm at the >>> top of my controller. Within the cm module, a module called utility is >>> being imported. This module is also inside the cmweb folder. Now when I >>> call functions from the cm module, I am getting an error saying that the >>> utility module has no attribute 'function'. This was not happening before I >>> upgraded to 2.2.1. Any ideas what might be happening here? >>> >>> Thanks in advance. >>> >> --
[web2py] Re: importing issues
Yes and this is what I was curious about. I do have a utility module under myapp/modules/, however this cm module is calling it's own utility module completely outside of my app, so I don't understand how it could be getting them confused. This was never an issues in 1.99. I will try changing the name of the utility module inside my app and see if it helps though. Thanks! On Friday, November 30, 2012 6:37:41 AM UTC-8, Massimo Di Pierro wrote: > > Do you have anything under yourapp/modules/? > > On Thursday, 29 November 2012 17:30:30 UTC-6, Maggs wrote: >> >> I recently upgraded to web2py 2.2.1 from 1.99. I have an external set of >> modules that I am importing into my application. Since I updated to 2.2.1 I >> am getting errors saying that the module does not have the attribute >> 'function'. >> To explain further, I have an external set of modules under the folder >> cmweb. This folder is in my python path. I have from cmweb import cm at the >> top of my controller. Within the cm module, a module called utility is >> being imported. This module is also inside the cmweb folder. Now when I >> call functions from the cm module, I am getting an error saying that the >> utility module has no attribute 'function'. This was not happening before I >> upgraded to 2.2.1. Any ideas what might be happening here? >> >> Thanks in advance. >> > --
[web2py] Re: importing issues
Do you have anything under yourapp/modules/? On Thursday, 29 November 2012 17:30:30 UTC-6, Maggs wrote: > > I recently upgraded to web2py 2.2.1 from 1.99. I have an external set of > modules that I am importing into my application. Since I updated to 2.2.1 I > am getting errors saying that the module does not have the attribute > 'function'. > To explain further, I have an external set of modules under the folder > cmweb. This folder is in my python path. I have from cmweb import cm at the > top of my controller. Within the cm module, a module called utility is > being imported. This module is also inside the cmweb folder. Now when I > call functions from the cm module, I am getting an error saying that the > utility module has no attribute 'function'. This was not happening before I > upgraded to 2.2.1. Any ideas what might be happening here? > > Thanks in advance. > --