noneType in Step by step tutorial

View: New views
9 Messages — Rating Filter:   Alert me  

noneType in Step by step tutorial

by jvandal :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

 I am following the Step By step Guide to Dabo and I got to the "Taking a Test Run"
This is  my flow.
I looked at  the messages but I didn't find a solution I could understand. I am running the Windows Vista
Any help will be appreciated.
Thanks \
Jim
=======================================================
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\jim>cd\

C:\>cd dabo-*

C:\dabo-0.9.2-win>cd dabo

C:\dabo-0.9.2-win\dabo>cd projects

C:\dabo-0.9.2-win\dabo\projects>cd hours

C:\dabo-0.9.2-win\dabo\projects\hours>dir
 Volume in drive C is HP
 Volume Serial Number is BCCA-FD8E

 Directory of C:\dabo-0.9.2-win\dabo\projects\hours

10/29/2009  12:16 AM    <DIR>          .
10/29/2009  12:16 AM    <DIR>          ..
10/29/2009  12:05 AM    <DIR>          biz
10/27/2009  11:31 PM    <DIR>          db
10/29/2009  12:16 AM               296 main.py
10/27/2009  10:39 PM    <DIR>          reports
10/27/2009  10:39 PM    <DIR>          resources
10/27/2009  10:39 PM    <DIR>          test
10/28/2009  11:42 PM    <DIR>          ui
               1 File(s)            296 bytes
               8 Dir(s)  185,095,516,160 bytes free

C:\dabo-0.9.2-win\dabo\projects\hours>python main.py
c:\python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\lib\SimpleCrypt.py:32: U
serWarning:
WARNING:
Your application uses SimpleCrypt, which is fine for testing but should
not be used in production, because:

1) Anyone with a copy of Dabo could decrypt your password.

2) It isn't portable between 32-bit and 64-bit python. See the trac
   ticket at http://trac.dabodev.com/ticket/1179 for more information.

  """, UserWarning)
Traceback (most recent call last):
  File "main.py", line 13, in <module>
    app.start()
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\dApp.py", line 3
76, in start
    self.setup()
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\dApp.py", line 3
32, in setup
    self.initUIApp()
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\dApp.py", line 3
68, in initUIApp
    self.uiApp.setup()
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\uiApp.py
", line 406, in setup
    frm = self.dApp.MainForm = dabo.ui.createForm(mfc)
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\__init__
.py", line 1168, in createForm
    frm = cls(*args, **kwargs)
  File "c:\users\jim\appdata\local\temp\tmpp9qkkt.py", line 9, in __init__
    super(dForm_92236, self).__init__(parent=parent, attProperties=attProperties
, *args, **kwargs)
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\dForm.py
", line 933, in __init__
    BaseForm.__init__(self, preClass, parent, properties, attProperties, *args,
**kwargs)
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\dForm.py
", line 44, in __init__
    fm.dFormMixin.__init__(self, preClass, parent, properties, attProperties, *a
rgs, **kwargs)
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\dFormMix
in.py", line 89, in __init__
    attProperties, *args, **kwargs)
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\dPemMixi
n.py", line 186, in __init__
    self._afterInit()
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\dForm.py
", line 71, in _afterInit
    super(BaseForm, self)._afterInit()
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\dFormMix
in.py", line 139, in _afterInit
    self.createBizobjs()
  File "c:\users\jim\appdata\local\temp\tmpp9qkkt.py", line 331, in createBizobj
s
    bizClient = self.Application.biz.ClientBizobj(conn)
AttributeError: 'NoneType' object has no attribute 'ClientBizobj'

C:\dabo-0.9.2-win\dabo\projects\hours>python main.py
c:\python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\lib\SimpleCrypt.py:32: U
serWarning:
WARNING:
Your application uses SimpleCrypt, which is fine for testing but should
not be used in production, because:

1) Anyone with a copy of Dabo could decrypt your password.

2) It isn't portable between 32-bit and 64-bit python. See the trac
   ticket at http://trac.dabodev.com/ticket/1179 for more information.

  """, UserWarning)
Traceback (most recent call last):
  File "main.py", line 13, in <module>
    app.start()
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\dApp.py", line 3
76, in start
    self.setup()
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\dApp.py", line 3
32, in setup
    self.initUIApp()
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\dApp.py", line 3
68, in initUIApp
    self.uiApp.setup()
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\uiApp.py
", line 406, in setup
    frm = self.dApp.MainForm = dabo.ui.createForm(mfc)
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\__init__
.py", line 1168, in createForm
    frm = cls(*args, **kwargs)
  File "c:\users\jim\appdata\local\temp\tmphpl5an.py", line 9, in __init__
    super(dForm_64574, self).__init__(parent=parent, attProperties=attProperties
, *args, **kwargs)
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\dForm.py
", line 933, in __init__
    BaseForm.__init__(self, preClass, parent, properties, attProperties, *args,
**kwargs)
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\dForm.py
", line 44, in __init__
    fm.dFormMixin.__init__(self, preClass, parent, properties, attProperties, *a
rgs, **kwargs)
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\dFormMix
in.py", line 89, in __init__
    attProperties, *args, **kwargs)
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\dPemMixi
n.py", line 186, in __init__
    self._afterInit()
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\dForm.py
", line 71, in _afterInit
    super(BaseForm, self)._afterInit()
  File "C:\Python25\lib\site-packages\dabo-0.9.2-py2.5.egg\dabo\ui\uiwx\dFormMix
in.py", line 139, in _afterInit
    self.createBizobjs()
  File "c:\users\jim\appdata\local\temp\tmphpl5an.py", line 331, in createBizobj
s
    bizClient = self.Application.biz.ClientBizobj(conn)
AttributeError: 'NoneType' object has no attribute 'ClientBizobj'

C:\dabo-0.9.2-win\dabo\projects\hours>

Re: noneType in Step by step tutorial

by Aaron Carlow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 29, 2009 at 6:50 PM, jvandal <sixs@...> wrote:

>
> Hi,
>
>  I am following the Step By step Guide to Dabo and I got to the "Taking a
> Test Run"
> This is  my flow.
> I looked at  the messages but I didn't find a solution I could understand.
> I
> am running the Windows Vista
> Any help will be appreciated.
> Thanks \
> Jim
>
> in.py", line 139, in _afterInit
>    self.createBizobjs()
>  File "c:\users\jim\appdata\local\temp\tmphpl5an.py", line 331, in
> createBizobj
> s
>    bizClient = self.Application.biz.ClientBizobj(conn)
> AttributeError: 'NoneType' object has no attribute 'ClientBizobj'
>
>
I'm new at this but just went through the tutorial myself.  The NoneType
error is referring to the fact that ClientBizobj doesn't exist I believe.
 Did you forget to add the following to ../biz/__init__.py perhaps?

from ClientBizobj import ClientBizobj
from HoursBizobj import HoursBizobj


I believe that's covered pretty early in the (excellent) tutorial.

Aaron L. Carlow


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: Dabo-users@...
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/394973d50910291911n3559909cgb0ea9bdf6a076dc8@...

Re: noneType in Step by step tutorial

by jvandal :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I checked the biz init file and I have those statements included. I have checked this several times. I have the database statement in the db folder. ConsultHours.cnxml
Any other suggestions??
Jim
Aaron Carlow wrote:
On Thu, Oct 29, 2009 at 6:50 PM, jvandal <sixs@ida.net> wrote:

>
> Hi,
>
>  I am following the Step By step Guide to Dabo and I got to the "Taking a
> Test Run"
> This is  my flow.
> I looked at  the messages but I didn't find a solution I could understand.
> I
> am running the Windows Vista
> Any help will be appreciated.
> Thanks \
> Jim
>
> in.py", line 139, in _afterInit
>    self.createBizobjs()
>  File "c:\users\jim\appdata\local\temp\tmphpl5an.py", line 331, in
> createBizobj
> s
>    bizClient = self.Application.biz.ClientBizobj(conn)
> AttributeError: 'NoneType' object has no attribute 'ClientBizobj'
>
>
I'm new at this but just went through the tutorial myself.  The NoneType
error is referring to the fact that ClientBizobj doesn't exist I believe.
 Did you forget to add the following to ../biz/__init__.py perhaps?

from ClientBizobj import ClientBizobj
from HoursBizobj import HoursBizobj


I believe that's covered pretty early in the (excellent) tutorial.

Aaron L. Carlow


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/394973d50910291911n3559909cgb0ea9bdf6a076dc8@mail.gmail.com

Re: noneType in Step by step tutorial

by Aaron Carlow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 29, 2009 at 8:54 PM, jvandal <sixs@...> wrote:

>
> I checked the biz init file and I have those statements included. I have
> checked this several times. I have the database statement in the db folder.
> ConsultHours.cnxml
> Any other suggestions??
> Jim
>
>
Just to be sure - you must also have  ClientBizobj.py in the ./biz directory
with the following code (as indicated in the tutorial):

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import dabo

class ClientBizobj(dabo.biz.dBizobj):
    def afterInit(self):
        self.DataSource = "clients"
        self.KeyField = "pkid"
        self.UserSQL = """select pkid, clientname, attn, rate, street1, street2,
                city, stateprov, postalcode
                from clients
                """


And of course in Python, case is important in both the name of the
file and the name of the class.


Aaron


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: Dabo-users@...
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/394973d50910292204v35384161ye34547d102bd43db@...

Re: noneType in Step by step tutorial

by Ed Leafe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 29, 2009, at 9:50 PM, jvandal wrote:

> File "c:\users\jim\appdata\local\temp\tmphpl5an.py", line 331, in
> createBizobjs
>   bizClient = self.Application.biz.ClientBizobj(conn)
> AttributeError: 'NoneType' object has no attribute 'ClientBizobj'

        This is because the framework tried but failed to add your bizobj  
into its namespace. My guess is that you are running the Class  
Designer from where that program is installed, but your application  
directory is somewhere else. Dabo tries to add your bizobjs to its  
application object namespace, so that you can refer to them as  
"self.Application.biz.MyBizClass", but when running under the Class  
Designer, the Application is the designer, not your app.

        Sometimes exiting the Class Designer and re-opening the design helps.  
Otherwise, you'll have to run the Class Designer from your app's home  
directory:

cd \Path\to\my\app
python \Path\to\ide\stuff\ClassDesigner.py ui\MyFormClass.cdxml


-- Ed Leafe





_______________________________________________
Post Messages to: Dabo-users@...
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/16A7FDAD-CA99-499C-B801-F3C182C1D6EE@...

Re: noneType in Step by step tutorial

by jvandal :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

HI,
Since the purpose is to run main.py I assume that you are telling me to create the step by step running with the path you indicated. ?
Can I put those in a file (how) and run them or do I need to make those statements every time?
 JIm
Ed Leafe wrote:
On Oct 29, 2009, at 9:50 PM, jvandal wrote:

> File "c:\users\jim\appdata\local\temp\tmphpl5an.py", line 331, in
> createBizobjs
>   bizClient = self.Application.biz.ClientBizobj(conn)
> AttributeError: 'NoneType' object has no attribute 'ClientBizobj'

        This is because the framework tried but failed to add your bizobj  
into its namespace. My guess is that you are running the Class  
Designer from where that program is installed, but your application  
directory is somewhere else. Dabo tries to add your bizobjs to its  
application object namespace, so that you can refer to them as  
"self.Application.biz.MyBizClass", but when running under the Class  
Designer, the Application is the designer, not your app.

        Sometimes exiting the Class Designer and re-opening the design helps.  
Otherwise, you'll have to run the Class Designer from your app's home  
directory:

cd \Path\to\my\app
python \Path\to\ide\stuff\ClassDesigner.py ui\MyFormClass.cdxml


-- Ed Leafe





_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/16A7FDAD-CA99-499C-B801-F3C182C1D6EE@leafe.com

Re: noneType in Step by step tutorial

by Aaron Carlow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My experience so far with ClassDesigner is that you must run the app from
the directory where your .cdxml file is located.  I ran across this problem
when attaching an image - if, as suggested, you store images under the
"resources" subdirectory, then the paths will only work correctly when doing
as Ed suggests.  If you don't, then you might end up where running main.py
works while editing with ClassDesigner doesn't or vice versa.

Aaron L. Carlow

On Fri, Oct 30, 2009 at 12:00 PM, jvandal <sixs@...> wrote:

>
> HI,
> Since the purpose is to run main.py I assume that you are telling me to
> create the step by step running with the path you indicated. ?
> Can I put those in a file (how) and run them or do I need to make those
> statements every time?
>  JIm
>
> Ed Leafe wrote:
> >
> > On Oct 29, 2009, at 9:50 PM, jvandal wrote:
> >
> >> File "c:\users\jim\appdata\local\temp\tmphpl5an.py", line 331, in
> >> createBizobjs
> >>   bizClient = self.Application.biz.ClientBizobj(conn)
> >> AttributeError: 'NoneType' object has no attribute 'ClientBizobj'
> >
> >       This is because the framework tried but failed to add your bizobj
> > into its namespace. My guess is that you are running the Class
> > Designer from where that program is installed, but your application
> > directory is somewhere else. Dabo tries to add your bizobjs to its
> > application object namespace, so that you can refer to them as
> > "self.Application.biz.MyBizClass", but when running under the Class
> > Designer, the Application is the designer, not your app.
> >
> >       Sometimes exiting the Class Designer and re-opening the design
> helps.
> > Otherwise, you'll have to run the Class Designer from your app's home
> > directory:
> >
> > cd \Path\to\my\app
> > python \Path\to\ide\stuff\ClassDesigner.py ui\MyFormClass.cdxml
> >
> >
> > -- Ed Leafe
> >
> >
> >
> >
> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: Dabo-users@...
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/394973d50910301220m7318053g2c518a6d891b9427@...

Re: noneType in Step by step tutorial

by jvandal :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I installed Dabo at the c: as C:\dabo-0.9.2-win\Dabo\ide\Classdesigner.py
                                                                       \ projects\Hours\biz,ui,db,other
                                                                        \other files
Is this something that can affect the outcome
Thanks,
Jim

Aaron Carlow wrote:
My experience so far with ClassDesigner is that you must run the app from
the directory where your .cdxml file is located.  I ran across this problem
when attaching an image - if, as suggested, you store images under the
"resources" subdirectory, then the paths will only work correctly when doing
as Ed suggests.  If you don't, then you might end up where running main.py
works while editing with ClassDesigner doesn't or vice versa.

Aaron L. Carlow

On Fri, Oct 30, 2009 at 12:00 PM, jvandal <sixs@ida.net> wrote:

>
> HI,
> Since the purpose is to run main.py I assume that you are telling me to
> create the step by step running with the path you indicated. ?
> Can I put those in a file (how) and run them or do I need to make those
> statements every time?
>  JIm
>
> Ed Leafe wrote:
> >
> > On Oct 29, 2009, at 9:50 PM, jvandal wrote:
> >
> >> File "c:\users\jim\appdata\local\temp\tmphpl5an.py", line 331, in
> >> createBizobjs
> >>   bizClient = self.Application.biz.ClientBizobj(conn)
> >> AttributeError: 'NoneType' object has no attribute 'ClientBizobj'
> >
> >       This is because the framework tried but failed to add your bizobj
> > into its namespace. My guess is that you are running the Class
> > Designer from where that program is installed, but your application
> > directory is somewhere else. Dabo tries to add your bizobjs to its
> > application object namespace, so that you can refer to them as
> > "self.Application.biz.MyBizClass", but when running under the Class
> > Designer, the Application is the designer, not your app.
> >
> >       Sometimes exiting the Class Designer and re-opening the design
> helps.
> > Otherwise, you'll have to run the Class Designer from your app's home
> > directory:
> >
> > cd \Path\to\my\app
> > python \Path\to\ide\stuff\ClassDesigner.py ui\MyFormClass.cdxml
> >
> >
> > -- Ed Leafe
> >
> >
> >
> >
> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/394973d50910301220m7318053g2c518a6d891b9427@mail.gmail.com

Re: noneType in Step by step tutorial

by Aaron Carlow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Oct 30, 2009 at 1:21 PM, jvandal <sixs@...> wrote:

>
> I installed Dabo at the c: as C:\dabo-0.9.2-win\Dabo\ide\Classdesigner.py
>                                                                       \
> projects\Hours\biz,ui,db,other
>
> \other files
> Is this something that can affect the outcome
> Thanks,
> Jim
>
>
I don't think so.  When testing on Windows (I'm creating an app for OSX,
Linux and Windows), I open a command prompt (start -> run -> cmd.exe) and
then cd into the projects ui directory.  From there I type
c:\path_to_dabo_ide_dir\ClassDesigner.py.

Aaron L. Carlow


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: Dabo-users@...
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/394973d50910301337i50f49550w3c369c1541d01762@...