Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Python ➜ Interpreters and instances

Interpreters and instances

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Wed 04 Mar 2009 01:13 AM (UTC)
Message
Is there a way for me to start a new interpreter per character/plugin/something? I currently have two plugins that utilize an ORM and I can't have them both loaded in the same MC instance or it chokes. How could this problem be solved?

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 04 Mar 2009 04:30 AM (UTC)
Message
What do you mean a new interpreter? MUSHclient creates a new script engine instance for each world, and each plugin within a world.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #2 on Wed 04 Mar 2009 10:04 AM (UTC)
Message
It does? Why do my plugins conflict then? This is odd, I'll have to test a bit more.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #3 on Wed 04 Mar 2009 10:05 AM (UTC)
Message
This is the error it presents when I load two plugins that use SQLobject (each plugin works fine by itself):


Script error
Plugin: Donation (called from world: Poromenos)
Execution of line 5 column 0
Immediate execution
Traceback (most recent call last):
  File "<Script Block >", line 5, in <module>
    class Character(SQLObject):
  File "i:\libs\python25\lib\site-packages\SQLObject-0.10.4-py2.5.egg\sqlobject\declarative.py", line 92, in __new__
    cls.__classinit__(cls, new_attrs)
  File "i:\libs\python25\lib\site-packages\SQLObject-0.10.4-py2.5.egg\sqlobject\main.py", line 810, in __classinit__
    classregistry.registry(cls.sqlmeta.registry).addClass(cls)
  File "i:\libs\python25\lib\site-packages\SQLObject-0.10.4-py2.5.egg\sqlobject\classregistry.py", line 91, in addClass
    '__file__', '(unknown)')))
ValueError: class Character is already in the registry (other class is <class '__ax_main__.Character'>, from the module __ax_main__ in (unknown); attempted new class is <class '__ax_main__.Character'>, from the module __ax_main__ in (unknown))

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


13,893 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.