py4j / py4j

Py4J enables Python programs to dynamically access arbitrary Java objects

Home Page:https://www.py4j.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting TypeError: 'NoneType' object is not callable in java_gateway.py

kareemamrr opened this issue · comments

I am using this lib which is a wrapper for some Java code and in turn uses py4j. For some reason when I run a specific line of code in a jupyter notebook everything works, when I try to run the same thing in a script I am faced with this error

Traceback (most recent call last):
  File "C:\Users\ammagdy\AppData\Roaming\Python\Python39\site-packages\datarobot_predict\scoring_code.py", line 201, in __del__
  File "C:\Users\ammagdy\AppData\Roaming\Python\Python39\site-packages\py4j\java_gateway.py", line 1991, in shutdown
  File "C:\ProgramData\Anaconda3\lib\logging\__init__.py", line 1445, in info
  File "C:\ProgramData\Anaconda3\lib\logging\__init__.py", line 1699, in isEnabledFor
TypeError: 'NoneType' object is not callable```
I am running version py4j 0.10.9.7, Python 3.9.10, Java 8 on Windows 10. Does anyone have a solution?