PyYAML bug with python 3.4.3 with metaclass

Issue #50 new
Leandro Poblet
created an issue

Hello,

I'm using PyYAML 3.11 with python 3.4.3 in an apache 2.4.7 in Ubuntu Trusty x86_64. The problem is whenever I run the application I get the following error:

[Wed Sep 30 14:14:39.691075 2015] [:error] [pid 15073:tid 140084342036224] [remote 10.0.2.2:45301] Traceback (most recent call last):
[Wed Sep 30 14:14:39.691231 2015] [:error] [pid 15073:tid 140084342036224] [remote 10.0.2.2:45301]   File "/var/www/carrito/application.wsgi", line 7, in <module>
[Wed Sep 30 14:14:39.692073 2015] [:error] [pid 15073:tid 140084342036224] [remote 10.0.2.2:45301]     from config import app as application
[Wed Sep 30 14:14:39.692244 2015] [:error] [pid 15073:tid 140084342036224] [remote 10.0.2.2:45301]   File "/var/www/carrito/config/__init__.py", line 2, in <module>
[Wed Sep 30 14:14:39.692993 2015] [:error] [pid 15073:tid 140084342036224] [remote 10.0.2.2:45301]     import os, yaml, datetime, locale
[Wed Sep 30 14:14:39.693231 2015] [:error] [pid 15073:tid 140084342036224] [remote 10.0.2.2:45301]   File "/opt/envs/carrito/lib/python3.4/site-packages/yaml/__init__.py", line 284
[Wed Sep 30 14:14:39.693473 2015] [:error] [pid 15073:tid 140084342036224] [remote 10.0.2.2:45301]     class YAMLObject(metaclass=YAMLObjectMetaclass):
[Wed Sep 30 14:14:39.693673 2015] [:error] [pid 15073:tid 140084342036224] [remote 10.0.2.2:45301]                               ^
[Wed Sep 30 14:14:39.693824 2015] [:error] [pid 15073:tid 140084342036224] [remote 10.0.2.2:45301] SyntaxError: invalid syntax

I have another app that runs with python 3.4.0 that does not have this problem, is it a PyYAML specific problem? Or maybe something in my setup?

EDIT: Tested this in python 2.7 and it works, the issue is with the latest version of python 3.

Comments (1)

  1. Log in to comment