%AddJar for hellospark_2.10-1.0.jar giving Name: java.util.zip.ZipException Message - apache-spark

I am trying to run AddJar in my new notebook in ibm bluemix.
%AddJar https://github.com/ibm-cds-labs/spark.samples/blob/master/dist/helloSpark-assembly-2.1.jar -f
However, I keep receiving this error -
Starting download from https://github.com/ibm-cds-labs/spark.samples/blob/master/dist/helloSpark-assembly-2.1.jar
Finished download of helloSpark-assembly-2.1.jar
Out[8]:
Name: java.util.zip.ZipException
Message: error in opening zip file
StackTrace: java.util.zip.ZipFile.open(Native Method)
java.util.zip.ZipFile.<init>(ZipFile.java:235)
java.util.zip.ZipFile.<init>(ZipFile.java:165)
java.util.zip.ZipFile.<init>(ZipFile.java:179)
I tried all sort of URLs - raw, file etc. as specified in this other link, but no help.
%AddJar for hellospark_2.10-1.0.jar giving Name: java.util.zip.ZipException Message: error in opening zip file
Please advice.
Thanks
Raj

Your URL points to an HTML page with a download button. You must use a URL that points to the actual JAR file instead. I got it by right-clicking on the download button and selecting "Copy Link Address". The URL has /raw/ instead of /blob/ in the path:
%AddJar https://github.com/ibm-cds-labs/spark.samples/raw/master/dist/helloSpark-assembly-2.1.jar -f
That line "worked" for me, in the sense that I got a totally different error messages on the first try: Assertion failed. After restarting the kernel and re-executing the %AddJar, the error was gone. Maybe my service didn't have the download directory yet when I executed the line for the first time.

Related

Running Detectron2 locally - windows - [Pytorch Config error]

I am trying to run this code locally:
https://gist.github.com/shashank524/74d8f46d5de633b84e2265fcc34774de#file-tabledetection-ipynb
After installing required packages, when I am trying to run this line:
import layoutparser as lp
# PubLayNet
model = layoutparser.Detectron2LayoutModel('lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config',extra_config=["MODEL.ROI_HEADS.SCORE_THRESH_TEST", 0.81],label_map={0: "Text", 1: "Title", 2: "List", 3:"Table", 4:"Figure"})
I receive this error:
OSError: [Errno 22] Invalid argument: 'C:\\Users\\username/.torch/iopath_cache\\s/f3b12qc4hc0yh4m\\config.yml?dl=1.lock'
I looked into the directory and there was no config file available.
I tried to download the config file from here (https://layout-parser.readthedocs.io/en/latest/notes/modelzoo.html) and put it in the directory but it didn't solve the issue!
Even I got a similar error. I tried out manually some work around in Windows.
I am using your case as example: OSError: [Errno 22] Invalid argument: 'C:\Users\username/.torch/iopath_cache\s/f3b12qc4hc0yh4m\config.yml?dl=1.lock'
Please follow the following process.
Navigate to C:\Users\username/.torch/iopath_cache\s/f3b12qc4hc0yh4m\config.yml
Open that config.yaml file
Scroll down to WEIGHTS: https://www.dropbox.com/s/h7th27jfv19rxiy/model_final.pth?dl=1 should be around 265 line.
Copy that link and paste it in your browser, a 'model_final.pth' will be downloaded. Copy this file to your desired folder.
Now replace the path to WEIGHTS: your_desired_folder\model_final.pth
Save it and run the code it works!
But there is a small work around I think before you do this (if you have not done)
iopath work around
https://github.com/Layout-Parser/layout-parser/issues/15 (Github link to the issue)
Hope this helps!

Linux:load error:No such file or directory

I am deploying a web server, and after I finish compiling.There are the executing documents;
01client.c client epoll_server.c server
Then I try to run server
./server
There is an error which I cant fix it. I have search ways for solving but still can't fix it.
load error: No such file or directory
Maybe some one can help me,please!
Thanks a lot!!!!
System utilities print the program generating the error at the beginning of the line followed by other useful information such as the name of the missing file, so this is probably an error from a user program. I can duplicate the error as follows:
errno = 2;
perror("load error");
which prints:
load error: No such file or directory
Look for the perror line in the server code. If it isn't clear what file it can't find, print the string from the failed command it is reporting.

running SALOME in windows 10 gives "Can't find a free port" error

I'm trying to run SALOME GUI using run_salome.bat. GUI doesn't start and gives "Can't find a free port to launch omniNamesTry to kill the running servers and then launch SALOME again." error.
SALOME version 9.4
Windows 10
I have searched the files in C:\Users<username>\AppData\Roaming that contain "omniORB_PortManager" in their name and deleted them.
Here the issue can be resolved be removing several files generated by SALOME.
start a Windows file browser
in the search bar, type: %userprofile%\.config\salome
delete all files present in that directory
in the search bar, type: %APPDATA%\salome
remove all files present in that directory
in the search bar, type: %APPDATA%
delete all files wich name starts with: .omni
delete file: .salome_PortManager.cfg
Finally, I strongly suggest to raise such questions directly on SALOME forum at this link

Gitlab misdetects binary file with text file and raises Internal Error (500 Whoops)

What is Issue?
When I push a link of the commit which invlolves a binary file from Commits view of a project on Gitlab, I recieve an Internal error ,"500 Whoops, something went wrong on our end."
This issue also appears when creating Merge Request whose origin is the same commit above.
Production.log says,
Started GET "/TempTest/bsp/commit/3098a49f2fd1c77be0c383994aa6655f5d15ebf8" for 127.0.0.1 at 2016-05-30 16:17:15 +0900
Processing by Projects::CommitController#show as HTML
Parameters:{"namespace_id"=>"TempTest", "project_id"=>"bsp", "id"=>"3098a49f2fd1c77be0c383994aa6655f5d15ebf8"}
Encoding::CompatibilityError (incompatible character encodings: UTF-8 and ASCII-8BIT):
app/views/projects/diffs/_file.html.haml:54:in `_app_views_projects_diffs__file_html_haml__1070266479743635718_49404820'
app/views/projects/diffs/_diffs.html.haml:22:in `block in _app_views_projects_diffs__diffs_html_haml__2984561770205002953_48487320'
app/views/projects/diffs/_diffs.html.haml:17:in `each_with_index'
app/views/projects/diffs/_diffs.html.haml:17:in `_app_views_projects_diffs__diffs_html_haml__2984561770205002953_48487320'
app/views/projects/commit/show.html.haml:12:in `_app_views_projects_commit_show_html_haml__3333221152053087461_45612480'
app/controllers/projects/commit_controller.rb:30:in `show'
lib/gitlab/middleware/go.rb:16:in `call'
Completed 500 Internal Server Error in 210ms (Views: 8.7ms | ActiveRecord: 10.5ms)
Gtilab seems to misdetect binary file with text file.
So HTML formatting engine seems to meet an error.("Encoding::CompatibilityError")
It's ok for me that Gitlab sometimes misdetects binary file with text file, but problem is that Gitlab server stops the transaction by Internal Error when such a misdetects occurs.
Could anyone tell me how to continue server transaction even if such a misjudge occurs?
For example, I assume the following answer.
e.g.1) Force to recognize a file to be a binary.
e.g.2) Bypass a HTML transforming when such a error occurs.
What I tried to resolve.
I added the description '*.XXX binary' to .gitattribute to confirm whether I can let a certain file recognize that it was binary file for Gitlab forcibly.
The Git client recognized the file to be binary file, and the diff did not output a text. However, there was no effect in Gitlab even if I did push it.
versions info
I faced this issue at first on Gitlab 8.6.2, but same issue occurs on 8.8.3.
I use git-2.7.2
Thank you.

opkg-cl update 2 download error

Am trying to update using opkg-cl. Getting the following errors. Does anyone know how I go about troubleshooting this?
[root#wrap /root]$ /etc/opkg/opkg_update.sh
Downloading /Packages.gz.
Downloading file:///mnt/usb/packages/Packages.gz.
Downloading https://beacon-repo.shoppertrak.com/repos/stable/Packages.gz.
Inflating https://beacon-repo.shoppertrak.com/repos/stable/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/all-remote-shoppertrak.
Downloading https://beacon-repo.shoppertrak.com/repos/base/Packages.gz.
Inflating https://beacon-repo.shoppertrak.com/repos/base/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/all-remote-base.
Collected errors:
* opkg_download: Failed to download /Packages.gz: URL using bad/illegal format or missing URL.
* copy_file: ///mnt/usb/packages/Packages.gz: No such file or directory.
* file_copy: Failed to copy file ///mnt/usb/packages/Packages.gz to /tmp/opkg-8FAiHb/update-iCH5Eo/all-local.gz.
[root#wrap /root]$ ls /mnt/usb/
[root#wrap /root]$
[root#wrap /root]$
Could you provide more information on your configuration?
Such as:
opkg version
content of your opkg feeds config file /etc/opkg/*.conf)
At first glance it looks like you have a local feed configured at file:///mnt/usb/packages/, which is lacking a Package.gz file.

Resources