Jump to content

arjun024

Members
  • Posts

    4
  • Joined

  • Last visited

arjun024's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. SOLVED the issue was actually this : my home dir wasn't /home/your_cpanel_username/ it was: /home1/your_cpanel_username/ Thanks a lot Geoff. if new users are given this home1 dir i suggest you make changes to your features/languages/python page Thanks again.
  2. No i am not using django. well i tried the following code snippet to get the exception info: #!/usr/bin/env python import sys def application(environ,start_response): try: import MySQLdb tx = 'successfully imported MySQLdb' except: tx = str(sys.exc_info()) status = '200 OK' response_headers = [('Content-Type','text/html'),('Content-Length',str(len(tx)))] start_response(status,response_headers) return [tx] it gave me the following: (, ExtractionError("Can't extract file(s) to egg cache\n\nThe following error occurred while trying to extract file(s) to the Python egg\ncache:\n\n [Errno 13] Permission denied: '//.python-eggs/MySQL_python-1.2.3-py2.7-linux-x86_64.egg-tmp'\n\nThe Python egg cache directory is currently set to:\n\n //.python-eggs\n\nPerhaps your account does not have write access to this directory? You can\nchange the cache directory by setting the PYTHON_EGG_CACHE environment\nvariable to point to an accessible directory.\n",), ) Plus, how do i set which python version to use, in my code. Thanks
  3. I am on Stevie. i am using the WSGI mode. The python features page (http://www.heliohost.org/home/features/languages/python) tells me that the python version is Python 2.4.3.. i am using the shebang line "#!/usr/bin/env python" The code i used is exactly like the snippet given in the python libraries section of the MySQL features page (http://www.heliohost.org/home/features/databases/mysql) .
  4. The features page of MySQL says that the MySQLdb python library is enabled. But, my python code gives a 500 Internal Server Error when using it. I commented out the MySQLdb section and made sure that the problem is with MySQLdb - the "import MySQLdb" itself causes the error. Is the library no more available here? Is there any other method i can access the database from the code ? Everything else is wonderful. Thanks
×
×
  • Create New...