Custom Query (121 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (52 - 54 of 121)

Ticket Resolution Summary Owner Reporter
#135 invalid PyYaml 3.08 w/ python 3.1 os x xi jjdenis@…

Reported by jjdenis@…, 5 years ago.

Description

I can not setup PyYaml? 3.08 to work with python 3.1 under os x

imac:PyYAML-3.08 jjdenis$ python setup.py install
running install
running build
running build_py
creating build
creating build/lib.macosx-10.5-i386-2.5
creating build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/__init__.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/composer.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/constructor.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/cyaml.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/dumper.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/emitter.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/error.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/events.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/loader.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/nodes.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/parser.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/reader.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/representer.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/resolver.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/scanner.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/serializer.py -> build/lib.macosx-10.5-i386-2.5/yaml
copying lib/yaml/tokens.py -> build/lib.macosx-10.5-i386-2.5/yaml
running build_ext
creating build/temp.macosx-10.5-i386-2.5
checking if libyaml is compilable
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c build/temp.macosx-10.5-i386-2.5/check_libyaml.c -o build/temp.macosx-10.5-i386-2.5/check_libyaml.o
unable to execute gcc: No such file or directory

libyaml is not found or a compiler error: forcing --without-libyaml
(if libyaml is installed correctly, you may need to
 specify the option --include-dirs or uncomment and
 modify the parameter include_dirs in setup.cfg)
running install_lib
running install_egg_info
Removing /Library/Python/2.5/site-packages/PyYAML-3.08-py2.5.egg-info
Writing /Library/Python/2.5/site-packages/PyYAML-3.08-py2.5.egg-info
imac:PyYAML-3.08 jjdenis$ python3
Python 3.1 (r31:73578, Jun 27 2009, 21:49:46) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named yaml
>>> quit()
imac:PyYAML-3.08 jjdenis$ python2.5
Python 2.5.1 (r251:54863, Feb  6 2009, 19:02:12) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> quit()
imac:PyYAML-3.08 jjdenis$ 
#36 invalid PyYaml and WebWare Don't Play Nicely... xi stef@…

Reported by stef@…, 8 years ago.

Description

Hello,

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)
        self._lock.acquire()
        try:
            try:
                file = open(filename)
            except IOError:
                raise KeyError, key
            try:
                try:
                    item = yaml.load(file)
                finally:
                    file.close()
            except:                 # session can't be unpickled
                os.remove(filename) # remove session file
                print "Error loading session from disk:", key
                self.application().handleException()
                raise KeyError, key
        finally:
            self._lock.release()
        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/20061016171933-d0e40d4c65b62dffbbe4c3d2b21922a5.ses', mode 'r' at 0xb71798d8> (/usr/local/web_work/Sessions/20061016171933-d0e40d4c65b62dffbbe4c3d2b21922a5.ses)
[Mon Oct 16 17:20:28 2006] [error] WebKit: Error while executing script /usr/local/web_work/Compass/RebookHotelPage.py
Traceback (most recent call last):
  File "/usr/local/webware-cvs/WebKit/Application.py", line 436, in dispatchRawRequest
    self.runTransaction(trans)
  File "/usr/local/webware-cvs/WebKit/Application.py", line 487, in runTransaction
    self.runTransactionViaServlet(servlet, trans)
  File "/usr/local/webware-cvs/WebKit/Application.py", line 512, in runTransactionViaServlet
    servlet.runTransaction(trans)
  File "WebKit/Servlet.py", line 41, in runTransaction
  File "/usr/local/webware-cvs/WebKit/Transaction.py", line 108, in awake
    self._servlet.awake(self)
  File "/usr/local/web_work/Compass/RebookHotelPage.py", line 74, in awake
    print " %s - %s " % ( self, self.session() )
  File "WebKit/Page.py", line 151, in session
  File "/usr/local/webware-cvs/WebKit/Transaction.py", line 69, in session
    self._session = self._application.createSessionForTransaction(self)
  File "/usr/local/webware-cvs/WebKit/Application.py", line 312, in createSessionForTransaction
    session = self.session(sessId)
  File "/usr/local/webware-cvs/WebKit/Application.py", line 279, in session
    return self._sessions[sessionId]
  File "/usr/local/webware-cvs/WebKit/SessionFileStore.py", line 59, in __getitem__
    myItem = yaml.load(file)
  File "build/bdist.linux-i686/egg/yaml/__init__.py", line 66, in load
  File "build/bdist.linux-i686/egg/yaml/constructor.py", line 38, in get_data
  File "build/bdist.linux-i686/egg/yaml/constructor.py", line 50, in construct_document
  File "build/bdist.linux-i686/egg/yaml/constructor.py", line 393, in construct_yaml_seq
  File "build/bdist.linux-i686/egg/yaml/constructor.py", line 120, in construct_sequence
  File "build/bdist.linux-i686/egg/yaml/constructor.py", line 96, in construct_object
  File "build/bdist.linux-i686/egg/yaml/constructor.py", line 572, in construct_python_object
  File "build/bdist.linux-i686/egg/yaml/constructor.py", 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 init.py 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

#85 fixed PyYaml don't have a version xi miki@…

Reported by miki@…, 6 years ago.

Description

There is currently no way I could find to detect the current version of PyYaml? I'm using.

There should be a __version__ in the top level yaml module

Note: See TracQuery for help on using queries.