Import Problem

Chris Rebert clp2 at rebertia.com
Sun Dec 20 12:43:36 CET 2009


On Sun, Dec 20, 2009 at 3:34 AM, Victor Subervi <victorsubervi at gmail.com> wrote:
<snip>
> But I get this error:
>
> /var/www/html/angrynates.com/cart/createTables2.py
>   263 </html>
>   264 '''
>   265
>   266 createTables2()
>   267
> createTables2 = <function createTables2>
>  /var/www/html/angrynates.com/cart/createTables2.py in createTables2()
>   105     these.append(basic)
>   106   i = 0
>   107   specialtyStore = addStore()
>   108   addStore = []

Rename this list so its name isn't the same as the addStore() function
which you call. For more info, see:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/46b4c8af3196caaa?pli=1

>   109   addStore.append(specialtyStore)
> specialtyStore undefined, global addStore = <function addStore>
>
> UnboundLocalError: local variable 'addStore' referenced before assignment
>       args = ("local variable 'addStore' referenced before assignment",)

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list