[ https://issues.apache.org/jira/browse/AIRFLOW-3259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fokko Driesprong resolved AIRFLOW-3259. --------------------------------------- Resolution: Fixed > Internal Server Error when creating charts because of sort function > ------------------------------------------------------------------- > > Key: AIRFLOW-3259 > URL: https://issues.apache.org/jira/browse/AIRFLOW-3259 > Project: Apache Airflow > Issue Type: Bug > Components: dependencies > Affects Versions: 1.10.0 > Environment: I reproduces this error in two environments > CentOs 7 with python2.7 > MacOs High Sierra with python 3.6 > Reporter: Zakaria EL Mesaoudi > Assignee: Zakaria EL Mesaoudi > Priority: Blocker > Labels: pull-request-available > Fix For: 2.0.0 > > Attachments: Screen Shot 2018-10-25 at 8.01.09 PM.png, Screen Shot > 2018-10-25 at 8.01.52 PM.png, Screen Shot 2018-10-25 at 8.02.50 PM.png, > Screen Shot 2018-10-25 at 8.16.53 PM.png > > > h2. {color:#205081}*Problem*{color} > h3. When you try to create a chart and display metrics you get an internal > server error (See picture below). > h3. !Screen Shot 2018-10-25 at 8.01.09 PM.png|width=605,height=222! > h2. {color:#205081}*Cause*{color} > h3. When you click on the url rendering the internal server error you get > this: (See picture below) > h2. !Screen Shot 2018-10-25 at 8.01.52 PM.png|width=605,height=535! > h3. A dependency issue: the function "sort" was deprecated and is no longer a > part of pandas Dataframe and thus it creates a problem when creating charts > in airflow. > h2. {color:#205081}*Solution*{color} > h3. The sort function needs to replaced by sort_values instead (See code > below) > > > {code:java} > # Replace this > df = df.sort(df.columns[0]) > # By this > df = df.sort_values(by=df.columns[0]) > {code} > In views.py (See picture below) > !Screen Shot 2018-10-25 at 8.02.50 PM.png|width=603,height=593! > h2. {color:#205081}*Result*{color} > The data is loaded and the chart displayed :D > !Screen Shot 2018-10-25 at 8.16.53 PM.png|width=607,height=245! > -- This message was sent by Atlassian JIRA (v7.6.3#76005)