Issue while using py-polars sink_parquet method on a LazyFrame - parquet

I am getting the below error while using sink_parquet on a LazyFrame. Earlier I was using .collect() on the output of the scan_parquet() to convert the result into a DataFrame but unfortunately it is not working with larger than RAM datasets. Here is the error I received -
PanicException: sink_parquet not yet supported in standard engine. Use 'collect().write_parquet()'
I am trying to write the LazyFrame (the output from scan_parquet) into a local file after I added some filter and join conditions on the LazyFrame.
It seems the error is coming from the below location -
https://github.com/pola-rs/polars/blob/master/py-polars/polars/internals/lazyframe/frame.py#L1235 (In Python)
https://github.com/pola-rs/polars/blob/master/polars/polars-lazy/src/physical_plan/planner/lp.rs#L154 (In Rust) .
I have tried updating to the latest version 0.15.16 0.16.1 but this issue still exists .
Sample code :
pl.scan_parquet("path/to/file1.parquet")
.select([
pl.col("col2"),
pl.col("col2").apply( lambda x : ...)
.alias("splited_levels"),
..followed by more columns and .alias()
])
.join(<another lazyframe>,on="some key",how="inner")
.filter(...)
.filter(..)
..followed by some more filters
.sink_parquet("path/to/result2.parquet")
The parquet file should be written in local system. Instead I am getting the below error -
PanicException: sink_parquet not yet supported in standard engine. Use 'collect().write_parquet()'
Here are the details of the installed packages after I used polars.show_versions() -
--- Version info----
Polars : 0.15.16
Index type : UInt32
Platform : Linux-4.15.0-191-generic-x86_64-with-glibc2.28
Python: 3.9.16
[GCC 8.3.0]
--- Optional dependencies---
pyarrow : 11.0.0
pandas : not installed
numpy : 1.24.1
fsspec : 2023.1.0
connectorx : not installed
xlsx2csv : not installed
deltalake: not installed
matplotlib : not installed
Update : I have raised a github issue here for the same and it seems all types of queries are not supported for streaming at this moment . So I am looking for a work around in this case or any alternative way of doing this with polars
https://github.com/pola-rs/polars/issues/6603

Related

HL7 FHIR IG Publisher returns java NullPointerException

I'm trying to generate documentation of my HL7 FHIR profiles using IG Publisher (publisher.jar). I'm running it on command line on macOS. I've uploaded the IG resource on Simplifier and it validates with no errors.
The problem is that i'm getting java.lang.NullPointerException. Full output below:
java -jar publisher.jar -ig fsh-generated/resources/ImplementationGuide-nfz.pozplus.json -tx n/a
FHIR IG Publisher Version 1.1.120 (Git# 210e48f945ad). Built 2022-05-13T15:20:39.709Z (8 days old)
Detected Java version: 11.0.10 from /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home on Mac OS X/x86_64 (64bit). 2048MB available
dir = /Users/marcingrudzien/Library/CloudStorage/OneDrive-Osobisty/Praca/iEHReu/NFZ/POZ-Plus/FHIR/sushi-test/NfzTest, path = /Users/marcingrudzien/.gem/ruby/3.1.2/bin:/Users/marcingrudzien/.rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/bin:/Users/marcingrudzien/.rubies/ruby-3.1.2/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Postgres.app/Contents/Versions/latest/bin
Parameters: -ig fsh-generated/resources/ImplementationGuide-nfz.pozplus.json -tx n/a
Start Clock # sobota, 21 maja 2022 20:56:04 czas środkowoeuropejski letni (2022-05-21T20:56:04+02:00)
API keys loaded from /Users/marcingrudzien/fhir-api-keys.ini (00:00.0027)
Package Cache: /Users/marcingrudzien/.fhir/packages (00:00.0030)
Load Configuration from /Users/marcingrudzien/Library/CloudStorage/OneDrive-Osobisty/Praca/iEHReu/NFZ/POZ-Plus/FHIR/sushi-test/NfzTest/fsh-generated/resources/ImplementationGuide-nfz.pozplus.json (00:00.0053)
Root directory: /Users/marcingrudzien/Library/CloudStorage/OneDrive-Osobisty/Praca/iEHReu/NFZ/POZ-Plus/FHIR/sushi-test/NfzTest/fsh-generated/resources (00:00.0084)
Publishing Content Failed: null (00:00.0086)
(00:00.0087)
Use -? to get command line help (00:00.0087)
(00:00.0087)
Stack Dump (for debugging): (00:00.0088)
java.lang.NullPointerException
at org.hl7.fhir.igtools.publisher.Publisher.initializeFromJson(Publisher.java:2947)
at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:2168)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:854)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:10144)
I hope someone here could help me. I could provide any additional information, if needed.
From the stack dump, you are missing a "path" property in your json config file, but I highly recommend that you switch to using the new set up, a ini file that points to a template and a IG resource. Use something like the sample-ig as a starter (https://github.com/FHIR/sample-ig) or see the how-to (https://build.fhir.org/ig/FHIR/ig-guidance/index.html)

Version mismatch between H2O and R package, where to get the right one?

I am using H2O (basic version) and it works well. I want to try Deep Water for GPU support. So, I carefully followed the instruction on;
https://www.h2o.ai/deep-water/#try
to install Deep Water. However, it failed to run and showed this error:
Error in h2o.init(nthreads = -1, port = 54323, startH2O = FALSE) :
Version mismatch! H2O is running version 3.15.0.393 but h2o-R package is version 3.13.0.369.
Install the matching h2o-R version from - http://h2o-release.s3.amazonaws.com/h2o/(HEAD detached at c46596cad)
Where do I get the right version?
According to the deep-water link, it wants you to use 3.13.0. And your error message is saying you are using the 3.13.0.369 R package.
So, I think the problem is that you have 3.15.0.393 already running on this machine. Kill it and try again.
From inside your current R session, h2o.shutdown() might work. If not, and you using unix, do something like ps auxw | grep h2o to find its PID and kill it; if using Windows search for h2o in the task manager. Or, cleanest, if you know you have an R (or Python, etc.) client where you started that 3.15.0 version of H2O, go and close that client.
you can force the Connection
h2o.init(ip=Cluster_ip, port = Cluster_port,
strict_version_check = FALSE,
startH2O = FALSE)

"Symbol not found" error, (possibly) due to recent upgrade to R2017b?

I'm getting an error when I try to use imerode() from the command line, e.g.
test=magic([100 100])>200;
imclose(test,strel('disk',10,0));
I get this error:
Error using images.internal.morphmex Invalid MEX-file
'/Applications/MATLAB_R2017b.app/toolbox/images/images/+images/+internal/morphmex.mexmaci64':
dlopen(/Applications/MATLAB_R2017b.app/toolbox/images/images/+images/+internal/morphmex.mexmaci64,
6): Symbol not found: _OSAtomicDecrement32Barrier Referenced from:
/Applications/MATLAB_R2017b.app/bin/maci64/./libcudart.8.0.dylib
Expected in: /usr/lib/libSystem.B.dylib in
/Applications/MATLAB_R2017b.app/bin/maci64/./libcudart.8.0.dylib.
Error in images.internal.morphop (line 103)
B = images.internal.morphmex(mex_method, B, nhood, height, unpacked_M);
Error in imdilate (line 135) B =
images.internal.morphop(A,se,'dilate',mfilename,varargin{:});
Error in imclose (line 82)
outputImage = imerode(imdilate(inputImage,se,packopt,M),se,packopt,M);
I'm on OS X 10.9.5, with MATLAB R2017b.
I've checked that morphmex.mexmaci64 is there in the given path (above).
Not sure where /./ refers to, but libcudart.8.0.dylib is in maci64 folder.
Not sure where /usr/lib/... is.
EDIT
I have uninstalled R2017b and installed R2017a (why not, just in case...) and when trying to run the same code, I now get this error (which seems worse...)
Segmentation violation detected at Mon Nov 13 13:44:29 2017
Configuration: Crash Decoding : Disabled - No sandbox or build
area path Crash Mode : continue (default) Current
Graphics Driver: Unknown hardware Current Visual : Quartz
Default Encoding : ISO-8859-1 Deployed : false Host
Name : eduroam-206-52.nomadic.bris.ac.uk MATLAB
Architecture : maci64 MATLAB Entitlement ID: 1803495 MATLAB Root
: /Applications/MATLAB_R2017a.app MATLAB Version : 9.2.0.556344
(R2017a) OpenGL : hardware Operating System :
Darwin 13.4.0 Darwin Kernel Version 13.4.0: Mon Jan 11 18:17:34 PST
2016; root:xnu-2422.115.15~1/RELEASE_X86_64 x86_64 Processor ID
: x86 Family 6 Model 69 Stepping 1, GenuineIntel Virtual Machine
: Java 1.7.0_75-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit
Server VM mixed mode Window System : Quartz
Fault Count: 2
Abnormal termination: Trace trap
Can upload error file for rest of message (too long to paste here).
Thanks in advance.
Looks like an installation problem or maybe it is due to the update.
Try to run the following commands in your console:
restoredefaultpath();
rehash toolboxcache;
If everything works without errors, then run:
savepath();
Turns out R2017a, b not compatible with OS Mavericks.
Rolled back to R2016a.

Getting error when using facebook authentication in codeigniter

I am using Facebook-Oauth. I am using windows 7 and i am trying to run it in my localserver. I am setting site-url :http://www.domain.com and canvas url : http://www.domain.com/ . I didn't make change any other change in settings in the facebook developer site.But whenever i am trying to run it in my localhost i am getting this error :
1.Message: Use of undefined constant CURLPROXY_HTTP - assumed 'CURLPROXY_HTTP'
2.Message: Use of undefined constant CURLAUTH_BASIC - assumed 'CURLAUTH_BASIC'
Both in
Filename: core/Loader.php
Line Number: 956
I have set the app id and app secrect key in the config file.
$config['facebook_app_id'] = '424824207643973';
$config['facebook_api_key'] = '424824207643973';
$config['facebook_secret_key'] = 'my-app-secretkey';
cURL is most likely not installed correctly or linked up to PHP. Windows does not come with cURL installed (another reason to switch to a *nix based system! but I digress) so you'll need the appropriate dll files to enable it, then link those in via your php.ini file.
With regards to your current error, please check for syntax errors and leave a comment on this answer and update your provided source, and I'll modify.

How to install the product_images_olbs module in OpenERP 6?

I get the error "No references to product.group_product_manager" when I try to install the module product_images_olbs.
I have an OpenERP V 6.0.2 instance running on Ubuntu 10.04. But it seems I run into a documented error. This error shows up in the client (running on windows) when I want to install some modules:
Environment Information :
System : Windows-2003Server-5.2.3790-SP2
OS Name : nt
Operating System Release : 2003Server
Operating System Version : 5.2.3790
Operating System Architecture : 32bit
Operating System Locale : de_DE.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 6.0.2
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
File "/usr/share/pyshared/openerp-server/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/usr/share/pyshared/openerp-server/service/web_services.py", line 599, in dispatch
res = fn(db, uid, *params)
File "/usr/share/pyshared/openerp-server/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
(...)
File "/usr/share/pyshared/openerp-server/osv/orm.py", line 732, in _get_id
record_id = ir_model_data_obj._get_id(cr, uid, module, xml_id)
File "/usr/share/pyshared/openerp-server/tools/misc.py", line 823, in cached_result
result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)
File "/usr/share/pyshared/openerp-server/addons/base/ir/ir_model.py", line 602, in _get_id
raise ValueError('No references to %s.%s' % (module, xml_id))
ValueError: No references to product.group_product_manager
I was trying to install the product_images_olbs module 6.0.0.1
After some research I found 2 bugreports that seem to fit:
https://bugs.launchpad.net/magentoerpconnect/+bug/695516
https://bugs.launchpad.net/openobject-addons/+bug/695084
Edit: The solution in this case was actually that I have to use the latest version of product_images_olbs.
I thought I was using it but this was not the case, and this was caused by my wrong usage of bazaar. (I come from git but getting used to bazaar more and more ;)
And the accepted answer is correct if applied to the old version of the module.
This is the new version of \addons\product_images_olbs\security\ir.model.access.csv (from revision 5486):
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_product_images_olbs_product_images","product_images_olbs_product_images","model_product_images","base.group_sale_manager",1,1,1,1
An old version of the same file:
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_product_images_olbs_product_images","product_images_olbs_product_images","model_product_images","product.group_product_manager",1,1,1,1
The old file has references to product.group_product_manager, which is no longer correct for OpenERP 6.0.2
My memory's a bit hazy, but I think that error means that one of the XML files in the module you are trying to install has a reference to a record in the product module with id group_product_manager, but the product module doesn't contain any record with that id.
Do any of the bugs you found have patches or merge proposals? If so, do they help?
One possible solution is to look in the product module and see if that record id was changed to something similar and make the same change in the module you're installing.
Another option is to just remove the reference from the module you're installing. Depending on how it's used, that may or may not cause other problems.
Finally, you could create a record with that id for the new module to use. I think all those references get looked up in the ir_data table, so you could create a new record there.

Resources