<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Old Gamer &#187; linux</title>
	<atom:link href="http://theoldgamer.pri.ee/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://theoldgamer.pri.ee</link>
	<description>Blog about Life and games</description>
	<lastBuildDate>Wed, 24 Feb 2010 13:28:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Digging through problems</title>
		<link>http://theoldgamer.pri.ee/en/digging-through-problems/</link>
		<comments>http://theoldgamer.pri.ee/en/digging-through-problems/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 11:45:27 +0000</pubDate>
		<dc:creator>Alan Kesselmann</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[PIL]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[stackless]]></category>

		<guid isPermaLink="false">http://theoldgamer.pri.ee/?p=63</guid>
		<description><![CDATA[Last week i wrote about how you can get help with just about everything, in the internet. Lately i have proven myself wrong several times though. Problems started when i wanted to try specific python version (stackless python) for learning stocket and threading programming. I thought that stackless might be a good place to start, [...]]]></description>
			<content:encoded><![CDATA[<p>Last week i wrote about how you can get help with just about everything, in the internet. Lately i have proven myself wrong several times though. Problems started when i wanted to try specific python version (stackless python) for learning stocket and threading programming. I thought that stackless might be a good place to start, since eve-online mmo is based on stackless python, though they have improved it alot if i understood their pycon presentation correctly</p>
<p>This story begins a week ago, about the time when i was writing my last post.</p>
<p><span id="more-63"></span>Before i wrote last post about getting help, i installed stackless python. I am not a serious programmer and i am not some linux hacker, but with little help from the google i could do it just fine. After writing the last post i found that my django projects did not work any more. When opening page at localhost i got server error instead.</p>
<p>Not beeing very good with linux (i installed web server, phpmyadmin, mysql, apache and everything else, following instructions at howtoforge &#8211; if you want to install ubuntu web server run google search on howtoforge perfect ubuntu server), i was puzzled where to start my search, so i posted question on stackoverflow. I was told to look for problems in my apache error log. Actually i was told to look for just error log in /var/log/. Going to /var/log/apache2/error.log from there was not very hard.</p>
<p>Error log contained very useful information. I found that mod_python was not working any more. Question about this problem stayed unanswered for a while. But in the end i was told that since i had installed new python, none of the modules compiled for last python version would work. Right <img src='http://theoldgamer.pri.ee/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> . I really could have used that information before installing stackles. But then i probably would not have installed it and i would never learned what i know now.</p>
<p>After spending two days hoping that there is easyer solution than compiling all the modules again, i gave up and started with compiling python-mysql. Finding the right package was bit hard, but i found it <a title="python-mysqldb" href="http://sourceforge.net/projects/mysql-python/" target="_blank">here</a>. When i started compiling it i found that i also needed setuptools. Quick search yielded what i needed and i got them both installed easy enough. Instead of mod_python i started using mod_wsgi for my project.</p>
<p>After that, the only thing i needed was PIL for my project also contained some image related operations (user mugshots), and django requires PIL for its imagefield validation. Finding PIL was not hard at all, but yet again i found that main library was not enough. I needed jpeg and freetype, which i downloaded and installed, just as easy as other libraries.</p>
<p>I think that after doing all this i can call myself above average linux user <img src='http://theoldgamer.pri.ee/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . In any case, thats where BIG problems begun &#8211; my django project worked, but failed to handle uploaded images. In fact it returned me validation error when i uploaded .jpg image.I tried opening the same image from python prompt and it worked fine, but since django still raised validation error i had to dig deeper. I had to get into something that was really above my head. So i looked up where this error is coming from. Found that it comes from fields.py Imagefield validation and i found that the exact line that raises the error is where it tried to do Image.load() with uploaded image. When i commented it out i saw why the error was risen &#8211; django showed me error page which told me that PIL could not find jpeg library.Now that really was a cold shower &#8211; after doing all that compiling getting error like that&#8230;</p>
<p>So in the end i still have not solved this problem. I guess that it is related to python pathing and i could solve it if i could remove the correct library that handles jpeg for old python and remove it. But so far all my questions about how to find it have gone unanswered. I have not given up, but since i wanted to try how easy it is to get Satchmo store up and running i reinstalled kubuntu. I will try this stackless problem again some day soon, since i still want to learn sockets and threading. After all i also want to create my own game!</p>
]]></content:encoded>
			<wfw:commentRss>http://theoldgamer.pri.ee/en/digging-through-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
