Question: ```
import java.util.*;
import java.io.*;

public class comparing{

static ArrayList <compare> events = new ArrayList<compare>();

public static void main(String[]args){

  try{
     Scanner in = new Scanner(new File("events.txt"));
     File output = new File("chines.txt");
     Scanner sc = new Scanner(output);
     PrintWriter printer = new PrintWriter(output);

     while(in.hasNext()){

        int temp = in.nextInt();
        String temptwo = in.nextLine();
        //String s = ;

        events.add(new compare(temp,temptwo));
     //System.out.println("Next word is:  " + temp);

        Collections.sort(events);
        for(int i = 0;i<events.size();i++){

           printer.write(events.get(i));
           System.out.println(events.get(i));
        }
     }
  }
  catch(Exception e){
     System.out.println("Invalid file name");
  }
}

```

My code above reads from a file it sorts the data then prints it out. What I would like to do is write this sorted data to another file but I keep getting the following error:

```
  comparing.java:27: error: no suitable method found for write(compare)
               printer.write(events.get(i));  

```

Answer: 
You seem to have installed the JWT package, which is only compatible with Python 3.4+. The rest-framework-jwt app is trying to import that rather than PyJWT which is compatible with 2.7.

Remove that installation with `pip uninstall jwt`. Once removed you'll want to install PyJWT like so:

```
pip install PyJWT

```
Not need to uninstall jwt. Just upgrade your PyJWT

```
pip install PyJWT --upgrade

```