[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Python
. . -> [Subject]  Interpreters and instances

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Interpreters and instances

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Wed 04 Mar 2009 01:13 AM (UTC)  quote  ]
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!
[Go to top] top

Posted by Nick Gammon   Australia  (18,800 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Wed 04 Mar 2009 04:30 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #2 on Wed 04 Mar 2009 10:04 AM (UTC)  quote  ]
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!
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #3 on Wed 04 Mar 2009 10:05 AM (UTC)  quote  ]
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!
[Go to top] 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.


1,670 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]