Skip to content

Instantly share code, notes, and snippets.

@anistark
Last active September 6, 2016 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anistark/2422aaf4304d1328119f3397420d9e37 to your computer and use it in GitHub Desktop.
Save anistark/2422aaf4304d1328119f3397420d9e37 to your computer and use it in GitHub Desktop.
Common Python Errors

Common Python Errors and handling them

lxml error on mac

Occurance :

    #include "libxml/xpath.h"
             ^
    1 error generated.
    *********************************************************************************
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    Perhaps try: xcode-select --install
    *********************************************************************************
    error: command '/usr/bin/clang' failed with exit status 1

Solution :

STATIC_DEPS=true pip install lxml

Flask Request Data Fetching

request.args : If you want the parameters in the URL
request.form : If you want the information in the body (as sent by a html POST form)
request.values : If you want both
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment