django – ‘int’ object has no attribute ‘keys’

Being new to Django, sometimes I face interesting problems. If it is very late and you are very tired, It may not always be easy to see the problem looking at the displayed error message like this int’ object has no attribute ‘keys’ error message I got in cursor.execute() method 🙂 This error was thrown on the […]

Django NoReverseMatch Error

Django’s reverse method can be found under django.core.urlresolvers (new versions: django.urls). To be able to use it you should import it like so:

reverse method is used to generate urls so that you can use them in your template files, model methods, view methods etc. Why do we use them? We use them not to […]

WAMP Server – 500 Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request. If you are using WAMP Server as your local PHP development stack you might encounter this error. One of the possible reasons is, let me tell you straight away, that you have defined some rewrite rules in your .htaccess file […]

PHP Fatal error: Call to undefined method mysqli_stmt::get_result()

I had this error message when I deployed my PHP website to my cPanel PHP hosting company. This message was displayed on all the pages using “get_result()” on a mysqli statement. PHP Fatal error: Call to undefined method mysqli_stmt::get_result() Apparently mysqlnd driver is required and for this you need to uncomment “extension=php_mysqli_mysqlnd.dll” in php.ini; and restarted Apache […]

Uncaught SyntaxError: Unexpected token CSS Error

I am back after a long time. I have been quite busy with some things in my life and some projects too and today I wanted to get back writing with this mini post. Yesterday I was working on this project of mine and wanted to utilize a third-party drop-down control in a page. It […]

MySQL- Commands out of sync you can’t run this command now

Today, I coded a piece of PHP where there were 2 consecutive calls to 2 MYSQL stored procedures (select statements). The first “call” queried the database and populated a page area with the result, and the second call came right after the first call to populate another area with another result set. I thought everything […]

Can’t find ‘__main__’ module in ” – Python (Sublime Text 3)

This is the easiest one, don’t panic. I think you forgot to save your file first 🙂 🙂 Just save your Python script with .py extension and run it again. It should work this time. Assuming you have successfully: Installed Sublime Text 3, Installed your version of Python, Created your Python.sublime-build file, Added your “path” variable. For […]