Custom Query (121 matches)


Show under each result:

Results (58 - 60 of 121)

Ticket Resolution Summary Owner Reporter
#36 invalid PyYaml and WebWare Don't Play Nicely... xi stef@…

Reported by stef@…, 9 years ago.



Sorry to ask a stupid question, but, is PyYaml? thread-safe ? I am trying to run PyYaml? under WebWare? and I get a session identifier. Due to the nature of WebWare? being servlet based, I find that it sometimes calls 'get session' more than once during the lifetime of processing the servlet. The code that get's run more than once is;

    def __getitem__(self, key):
        if debug:
            print '>> get (%s)' % key
        filename = self.filenameForKey(key)
                file = open(filename)
            except IOError:
                raise KeyError, key
                    item = yaml.load(file)
            except:                 # session can't be unpickled
                os.remove(filename) # remove session file
                print "Error loading session from disk:", key
                raise KeyError, key
        return item

When I put wrapper print statements around the yaml.load, I notice that the first time it works without fail, the next time I get this;

>> get (20061016171933-d0e40d4c65b62dffbbe4c3d2b21922a5)
 RIGHT BEFORE YAML.load for <open file '/usr/local/web_work/Sessions/', mode 'r' at 0xb71798d8> (/usr/local/web_work/Sessions/
[Mon Oct 16 17:20:28 2006] [error] WebKit: Error while executing script /usr/local/web_work/Compass/
Traceback (most recent call last):
  File "/usr/local/webware-cvs/WebKit/", line 436, in dispatchRawRequest
  File "/usr/local/webware-cvs/WebKit/", line 487, in runTransaction
    self.runTransactionViaServlet(servlet, trans)
  File "/usr/local/webware-cvs/WebKit/", line 512, in runTransactionViaServlet
  File "WebKit/", line 41, in runTransaction
  File "/usr/local/webware-cvs/WebKit/", line 108, in awake
  File "/usr/local/web_work/Compass/", line 74, in awake
    print " %s - %s " % ( self, self.session() )
  File "WebKit/", line 151, in session
  File "/usr/local/webware-cvs/WebKit/", line 69, in session
    self._session = self._application.createSessionForTransaction(self)
  File "/usr/local/webware-cvs/WebKit/", line 312, in createSessionForTransaction
    session = self.session(sessId)
  File "/usr/local/webware-cvs/WebKit/", line 279, in session
    return self._sessions[sessionId]
  File "/usr/local/webware-cvs/WebKit/", line 59, in __getitem__
    myItem = yaml.load(file)
  File "build/bdist.linux-i686/egg/yaml/", line 66, in load
  File "build/bdist.linux-i686/egg/yaml/", line 38, in get_data
  File "build/bdist.linux-i686/egg/yaml/", line 50, in construct_document
  File "build/bdist.linux-i686/egg/yaml/", line 393, in construct_yaml_seq
  File "build/bdist.linux-i686/egg/yaml/", line 120, in construct_sequence
  File "build/bdist.linux-i686/egg/yaml/", line 96, in construct_object
  File "build/bdist.linux-i686/egg/yaml/", line 572, in construct_python_object
  File "build/bdist.linux-i686/egg/yaml/", line 551, in make_python_instance
TypeError: __new__() takes exactly 2 arguments (1 given)

So, from my total layman's perspective, it appears that the is expected to be called 'once', yet due to WebWare?'s threading, I think it get's called more than once. Either way, I could be totally and whole heartedly wrong, any ideas ?

Priority is 'high' as I am on a strict timeline to understand what's going on, and severity is definitely 'blocker', as without a resolution, WebWare? can't use PyYaml?. Which, is kinda weird, but, at least in my experience :)

Regards and Thanks Stef

#37 invalid Cross referenced aliases unsupported ? xi Pwipwi

Reported by Pwipwi, 9 years ago.


Hi, the following doesn't work :

- &element1
  stuff: "Hey !"
  link: *element2 # this causes trouble

- &element2
  stuff: "Ho !"
  link: *element1

Is it normal, or is it just unsupported for now ? It would be nice to have it :)

#55 invalid Why can't I do "Abilities: Skills: Meele: Sword Staff"? xi arne_bab@…

Reported by arne_bab@…, 8 years ago.


Why can't I use an input document containing a line like the following?

Abilities: Skills: Meele: Sword Staff

Doesn't yaml permit that?

Note: See TracQuery for help on using queries.