UniTime / unitime

Comprehensive University Timetabling System
http://www.unitime.org
Apache License 2.0
274 stars 162 forks source link

Issue importing CSV file #89

Closed aweaver1fandm closed 3 years ago

aweaver1fandm commented 3 years ago

unitime.txt I have a user trying to import some data as a CSV file (I renamed the file here to be able to upload, original file name was: Unitime Class File- test.csv

When they do that they get a null pointer exception (See image that hopefully uploaded) image The unitime logfile on the server has almost no other information that is different from what is on the screen...

[07/12/21 15:23:23] INFO JProf -> Using wall time. [07/12/21 15:23:39] INFO TilesRequestProcessor -> Tiles definition factory found for request processor ''. [07/12/21 15:23:45] INFO Registration -> Registration information received. [07/12/21 15:24:23] INFO QueueProcessor -> Queue processor is up and running. [07/12/21 15:24:23] INFO QueueProcessor -> Waiting for tasks to run... [07/12/21 15:24:40] INFO QueueProcessor -> Executing Course Offerings: Generate XML [07/12/21 15:24:40] ERROR ScriptExecution -> Execution failed: java.lang.NullPointerException at org.unitime.timetable.server.script.ScriptExecution.execute(ScriptExecution.java:151) at org.unitime.timetable.util.queue.QueueItem.executeItem(QueueItem.java:104) at org.unitime.timetable.server.script.ScriptExecution.executeItem(ScriptExecution.java:308) at org.unitime.timetable.util.queue.LocalQueueProcessor$RunningItem.run(LocalQueueProcessor.java:247) [07/12/21 15:24:40] INFO QueueProcessor -> Task Course Offerings: Generate XML failed (null).

Any ideas what may be causing this issue?

says0528 commented 3 years ago

It looks to me like jython library may be missing from the tomcat lib directory. Can you check to see if the file "jython-standalone-2.5.3.jar” exists in the lib folder for the tomcat you are using? Let me know if it is missing and I can help you obtain a copy.

Thanks, Stephanie

On Jul 12, 2021, at 4:06 PM, aweaver1fandm @.***> wrote:

unitime.txt https://github.com/UniTime/unitime/files/6804090/unitime.txt I have a user trying to import some data as a CSV file (I renamed the file here to be able to upload, original file name was: Unitime Class File- test.csv

When they do that they get a null pointer exception (See image that hopefully uploaded) https://user-images.githubusercontent.com/55799947/125348925-da910200-e32a-11eb-8a18-d77070740040.png The unitime logfile on the server has almost no other information that is different from what is on the screen...

[07/12/21 15:23:23] INFO JProf -> Using wall time. [07/12/21 15:23:39] INFO TilesRequestProcessor -> Tiles definition factory found for request processor ''. [07/12/21 15:23:45] INFO Registration -> Registration information received. [07/12/21 15:24:23] INFO QueueProcessor -> Queue processor is up and running. [07/12/21 15:24:23] INFO QueueProcessor -> Waiting for tasks to run... [07/12/21 15:24:40] INFO QueueProcessor -> Executing Course Offerings: Generate XML [07/12/21 15:24:40] ERROR ScriptExecution -> Execution failed: java.lang.NullPointerException at org.unitime.timetable.server.script.ScriptExecution.execute(ScriptExecution.java:151) at org.unitime.timetable.util.queue.QueueItem.executeItem(QueueItem.java:104) at org.unitime.timetable.server.script.ScriptExecution.executeItem(ScriptExecution.java:308) at org.unitime.timetable.util.queue.LocalQueueProcessor$RunningItem.run(LocalQueueProcessor.java:247) [07/12/21 15:24:40] INFO QueueProcessor -> Task Course Offerings: Generate XML failed (null).

Any ideas what may be causing this issue?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/UniTime/unitime/issues/89, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACS6CD25BP7ZRPVBYFM7H7LTXNDODANCNFSM5AHQZGYQ.

aweaver1fandm commented 3 years ago

I copied the jar file into /var/lib/tomcat9/lib, chowned it appropriately and that seems to have corrected that issue but then the script processing dies with the following. If I had to guess it looks like it may be a data issue where the code expects a number but isn't getting one so I'm looking more into it image

says0528 commented 3 years ago

Based on the error, the problem is likely a badly formatted start time string for a section.

On Jul 13, 2021, at 10:21 AM, aweaver1fandm @.***> wrote:

I copied the jar file into /var/lib/tomcat9/lib, chowned it appropriately and that seems to have corrected that issue but then the script processing dies with the following. If I had to guess it looks like it may be a data issue where the code expects a number but isn't getting one so I'm looking more into it https://user-images.githubusercontent.com/55799947/125468768-03bd5117-65a5-4b6a-8748-52824bc414bf.png — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/UniTime/unitime/issues/89#issuecomment-879132548, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACS6CD2FLGB4SA2TDJCUFFTTXRDYHANCNFSM5AHQZGYQ.

aweaver1fandm commented 3 years ago

Closing the original issue as resolved by having the jython file. I will say that the few places I saw build/install instructions, none of them mentioned the need for the Jython file. The latest error I am working through and may have resolved. One of the classes had start time set to 0 and end time set to 1. If fixing those does not resolve the issue I will keep looking at the data. Thank you for the help

tomas-muller commented 3 years ago

UniTime does not support running Python scripts out of the box (mostly because the jython library is very large and it is not needed by most users -- e.g., most of the Documentation/Scripts run using the Java's default JavaScript engine). The ability how to enable Python on the Scripts page is described in the help page for the Scripts page, see http://help.unitime.org/Scripts, which is also available when you click on the question mark next to the page name.