Spyder does not autocomplete local variables

(Spyder dev here) Spyder does complete local variables but to have this functionality you need to install a library called rope. You can do it by running this command in a terminal If you use Python 3 this command needs to be Besides, code completion on the Editor works now with both Ctrl+Space and with Tab. Edit: Updated answer … Read more

Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) standard C memory issue

Check the return value of strtok. In your code here strtok is returning a NULL pointer and according to documentation, A null pointer is returned if there are no tokens left to retrieve. which matches my original guess that because the address code is 0x0 there’s a NULL pointer deference somewhere. Obviously, the following call to atoi is expecting a non-NULL pointer … Read more

Opening JSF Facelets page shows “This XML file does not appear to have any style information associated with it.”

This XML file does not appear to have any style information associated with it. The document tree is shown below. You will get this message in the client side when the client (the web browser) for some reason interprets the HTTP response content representing a HTML document as text/xml instead of text/html and the parsed XML tree doesn’t have … Read more

min() arg is an empty sequence

If you want to avoid this ValueError in general, you can set a default argument to min(), that will be returned in case of an empty list. See described here. Note that this only works in Python 3.4+

Pop index out of range

To get the final value of a list pop’ed, you can do it this way: Keep in mind that pop removes the item, and the list changes length after the pop. Use negative numbers to index from the end of a list that may be changing in size, or just use pop() with no arguments for the … Read more

ImportError: No Module Named bs4 (BeautifulSoup)

Activate the virtualenv, and then install BeautifulSoup4: When you installed bs4 with easy_install, you installed it system-wide. So your system python can import it, but not your virtualenv python. If you do not need bs4 to be installed in your system python path, uninstall it and keep it in your virtualenv. For more information about virtualenvs, read this