DOsinga / deep_learning_cookbook

Deep Learning Cookbox
Apache License 2.0
686 stars 335 forks source link

14.1 Importing icons -- Importing Issue and Solution #77

Open mikechen66 opened 4 years ago

mikechen66 commented 4 years ago

I complied the application guideines to complete the installation and downloading Icons8App. However, I have met an extracting error and have had the following solution.

Installation

$ pip install plyvel $ pip install svglib, $ sudo apt install p7zip-full

Download Icons8App

And download the from the weblink of https://icons8.com/app. Icons8App_for_Mac_OS.dmg is saved in the Downloads file.

Issue -- Open Errors: 1

During executing the command $ 7z x Icons8.app, it shows Open Errors: 1. Please see the details as follows.

$ cd Downloads ~/Downloads$ 7z x Icons8App_for_Mac_OS.dmg ~/Downloads/Icons8 v5.7.2$ 7z x Icons8.app

Would you like to replace the existing file: Path: ./TEXTtext Size: 318885 bytes (312 KiB) Modified: 2019-12-25 18:18:20 with the file from archive: Path: TEXTtext Size: 68631 bytes (68 KiB) ? (Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit? N

After random choosing the above-mentioned option, it shows the error.

Archives: 295 OK archives: 34 Can't open as archive: 260 Archives with Errors: 1

Open Errors: 1

After analyzing the error, I know that some files have redundant content. It is the source of the error.

Solution:

It is necessary to change to the absolute path to extract the file of icons-db4. It avoids the extracting error.

$ cd Downloads ~/Downloads$ 7z x Icons8App_for_Mac_OS.dmg

~/Downloads$ cd Icons8\ v5.7.2

~/Downloads/Icons8 v5.7.2$ cd Icons8.app/Contents/Resources ~/Downloads/Icons8 v5.7.2/Icons8.app/Contents/Resources$ tar -xvf icons.tar.gz c/ icons-db4/000006.log icons-db4/LOCK icons-db4/000005.ldb icons-db4/CURRENT icons-db4/LOG icons-db4/MANIFEST-000004 icons-db4/LOG.old

After executing the above-mentioned commands, it show a success. After running the example application, it generates icons (directory: home/user/icons)in the home directory. The icons file holder includes index.json that will be used in ### 14.2 Icon Autoencoding.

Notes:

In the In [6] sectionl, it shows the message as follows.

Can't handle color: url(#LP0GfCD4bXLuDCmAsJT~Ia)

I do not know how to solve the issue.

DOsinga commented 4 years ago

Never mind. I got things confused. I wonder if you can package your fixes up in the pull request we had before if that isn't already the case.

mikechen66 commented 4 years ago

Anyway, it is the issue that I met. I have solved it for your information. Cheers!