<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello, Alejandro,<br>
<br>
There is a bug in pyfeyn-0.3.4. In the file deco.py, change line
16 from<br>
<br>
<font color="#000099" face="verdana, sans-serif">1, selfsize, 45,
self.constriction,</font><br>
<br>
to<br>
<br>
<font color="#000099" face="verdana, sans-serif">1, selfsize, 45,
1,</font><br>
<br>
I think that this will solve your problem.<br>
<br>
Let me know if this works and have fun making Feynman Diagrams.<br>
<br>
George S. Williams<br>
<br>
<br>
On 3/25/2014 11:07 PM, Alejandro Gomez Espinosa wrote:<br>
</div>
<blockquote
cite="mid:CADOD3bockdDjToas66ugyaBPjrJGdydKgv2yRA81tYqA6cBbgA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,153)">Hi</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,153)"><br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,153)">I
was trying to use your package and I found an error. First I
installed your package like:</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,153)">sudo
python setup.py install</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,153)">seems
like is working because I opened python and I could import
that package. But when I copied the first of your examples, in
a file inside the untar folder, I got this error:</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,153)"><br>
</div>
<div class="gmail_default">
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif">Traceback (most recent call
last):</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> File "./test.py", line 17, in
<module></font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> fd.draw("pyfeyn-test4.pdf")</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> File
"/home/algomez/Downloads/pyfeyn-0.3.4/pyfeyn/diagrams.py",
line 69, in draw</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> c = self.drawToCanvas()</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> File
"/home/algomez/Downloads/pyfeyn-0.3.4/pyfeyn/diagrams.py",
line 61, in drawToCanvas</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif">
obj.draw(self.currentCanvas)</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> File
"/home/algomez/Downloads/pyfeyn-0.3.4/pyfeyn/lines.py",
line 329, in draw</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> canvas.stroke(path, styles)</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> File
"/usr/lib/python2.7/dist-packages/pyx/canvas.py", line
298, in stroke</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> self.draw(path,
[deco.stroked]+list(attrs))</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> File
"/usr/lib/python2.7/dist-packages/pyx/canvas.py", line
284, in draw</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> adeco.decorate(dp,
self.texrunner)</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> File
"/home/algomez/Downloads/pyfeyn-0.3.4/pyfeyn/deco.py",
line 46, in decorate</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> 1, self.size, 45,
constrictionlen)</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> File
"/home/algomez/Downloads/pyfeyn-0.3.4/pyfeyn/deco.py",
line 16, in getarrowpath</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif"> 1, selfsize, 45,
self.constriction,</font></div>
<div class="gmail_default"><font color="#000099"
face="verdana, sans-serif">NameError: global name 'self'
is not defined</font></div>
<div
style="color:rgb(0,0,153);font-family:verdana,sans-serif;font-size:small"><br>
</div>
<div
style="color:rgb(0,0,153);font-family:verdana,sans-serif;font-size:small">any
ideas? I will love to create Feynman Diagrams in python!! :D</div>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,153)"><br>
</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,153)">cheers,</div>
<div class="gmail_default"
style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,153)"><br>
</div>
<div><font face="arial, helvetica, sans-serif"><b
style="background-color:rgb(255,255,255)"><i>Alejandro
Gomez Espinosa </i></b><br>
<i style="background-color:rgb(255,255,255)">Department of
Physics and Astronomy </i><br>
<i style="background-color:rgb(255,255,255)">Rutgers, The
State University of New Jersey </i><br>
<i style="background-color:rgb(255,255,255)">136
Frelinghuysen Road </i></font>
<div><i style="background-color:rgb(255,255,255)"><font
face="arial, helvetica, sans-serif">Piscataway, NJ
08854-8019 USA<font size="3"> </font></font></i></div>
</div>
</div>
<br>
</blockquote>
<br>
</body>
</html>