Romern / syncMyMoodle

Synchronization client for RWTH Moodle
GNU General Public License v3.0
70 stars 18 forks source link

EOFError: Ran out of input #85

Closed fjw317 closed 2 years ago

fjw317 commented 2 years ago

Since yesterday I am getting this error when trying to execute syncmymoodle (smm1 is a alias for py -m syncmymoodle --config C:\Users\Username\env\config.json) :

(env) C:\Users\Username>smm1
Logging in...
Traceback (most recent call last):
  File "C:\Users\Username\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Username\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Username\env\lib\site-packages\syncmymoodle\__main__.py", line 1185, in <module>
    main()
  File "C:\Users\Username\env\lib\site-packages\syncmymoodle\__main__.py", line 1175, in main
    smm.login()
  File "C:\Users\Username\env\lib\site-packages\syncmymoodle\__main__.py", line 183, in login
    self.session.cookies.update(pickle.load(f))
EOFError: Ran out of input 

I am using the config file since October 2021, never had a problem so far. The Problem first appeared in version 0.0.2 but remained after I updated to version 0.0.3.

Romern commented 2 years ago

Could you delete the session file and try again?

fjw317 commented 2 years ago

Thank you that fixed it. The session file was empty. After deleting it syncmymoodle now runs as usual.

In case someone is experiencing the same issue in the future: I found the session file at ./session as defined in the config file.

dahcal commented 2 years ago

I'm getting the same error, however clearing the session file doesn't seem to fix it.

The exact location in code for the error differ however:

Logging in...
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\ProgramData\Anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\ProgramData\Anaconda3\lib\site-packages\syncmymoodle\__main__.py", line 794, in <module>
    smm.login()
  File "C:\ProgramData\Anaconda3\lib\site-packages\syncmymoodle\__main__.py", line 130, in login
    self.session.cookies.update(pickle.load(f))
EOFError: Ran out of input
Romern commented 2 years ago

@osccal You are still on an old version of syncmymoodle, please upgrade the package and try again.