Category Archives: PYTHON

Mongod error | exception in initAndListen std::exception: locale::facet::_S_create_c_locale name not valid

I got this error while trying to start mongodb on amazon ec2. Running this command in the terminal solved the problem. export LC_ALL=C I don’t have any idea about what it means at this time except that it sets the … Continue reading

Posted in MongoDB, OSX, PYTHON | Tagged , , | Leave a comment

Right way to break Django code for debugguing

Django traceback is a very helpful tool in Django development. It saves us from the boring tasking of writing print statements to track variables. Traceback doesn’t kick when there is no error.  There may be no coding errors but there … Continue reading

Posted in Django, PYTHON | Tagged , , , | Leave a comment

Where are python site packages located in MAC OSX Mountain Lion

Python site packages are located at Library/Python/2.7/site-packages

Posted in PYTHON | Tagged | Leave a comment

Error whil creating super user in django1.4 on MAC

I got the following error while trying to create a super user from shell for django1.4. File “/Library/Python/2.7/site-packages/django/contrib/auth/management/__init__.py”, line 85, in get_system_username     return getpass.getuser().decode(locale.getdefaultlocale()[1]) TypeError: decode() argument 1 must be string, not None This problem was rectified by running … Continue reading

Posted in Django, PYTHON | Tagged , | Leave a comment