-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: 'JavaPackage' object is not callable #77
Comments
Digging deeper around here, it seems like there's an issue with PySpark 2.4 (issue #63, addressed in unmerged pull-request #64). Though the Besides that issue, looking also more closely at the Anyway, just following the Maven Central link takes me somewhere, but I've got no idea on how/what to download and where to place it. I presume some JAR file(s) will be required. But how??? Any help would be appreciated for someone quite well informed on Python, OK on Java, but not well at all in the Scala eco-system. Stuff like that would be also awesome to find (both) in the README and the ReadTheDocs piece. |
Update: I got part way further. I have tracked down the But moving on forward still gave problems. Now I was getting a
Solution to this problem was to grab the correct version (fitting the Scala version Spark uses) off of Maven Central (e.g. here https://mvnrepository.com/artifact/org.clapper/grizzled-slf4j_2.11/1.3.4) and place it in the same Doing so I got (after the adaptation below for getting import pyspark
sc = pyspark.SparkContext('local', 'Flint Example')
spark = pyspark.sql.SparkSession(sc) The only thing still coughing up an error is the computation of It may be useful to mention some of these things in the install instructions. Most Python/data science practitioners are not quite developers who are into building such artifacts from Scala sources, but would happily be able to do a hearty |
Actually README mentions:
For me adding --jars and --py-files fixed the problem |
I'm using MacOS and I installed Spark 2.4.4 with Homebrew. But I used the aproach to add the Flint JAR to lib folder of Spark Now I'm stuck at the Py4JJavaError as well:
vkrot's approach did not work for me either When I switched back to Spark 2.3.4 I get this error:
|
@pohutukawa I have same problem, did you find a solution ?
|
OK, I figure it out . Restart jupyter notebook and create a fresh new spark session with It actually only need config |
I was facing the same problem with Pyarrow. My environment:
When I try to enable Pyarrow optimization like this: I get the following warning: I solved this problem by:
This will print the key-value pairs of spark configurations.
I found the following jars:
|
Whenever I try to use Flint here locally (no Hadoop/EMR involved), it keep barfing at me with the above error message in the subject. It's a setup on top of Python 3.7 with PySpark 2.4.4 and OpenJDK 8; an Ubuntu 19.04 install.
Note: As I'm running locally only, I'm getting this log message from Spark, but everything does run perfectly using vanilla PySpark:
It happens when I try to either read a PySpark dataframe into a
ts.flint.TimeSeriesDataFrame
. This example is adapted from theFlint Example.ipynb
:The last line causes the "boom", with this (first part of) the stack trace:
Any ideas what may be going wrong and how the problem could be solved?
The text was updated successfully, but these errors were encountered: