Module not found: Error: Can't resolve 'spdx-exceptions' - elasticsearch

I get this error while executing a script for building kibana version 7.9.1. That build usually runs smoothly. The new thing in my case is that I replaced dependencies like #elastic/eui with a customized #elastic/eui npm package published on my gitlab package registry. Application runs without any problem when launched in dev mode with yarn start. The error arises in the course of the build of the docker images.
More logs here:
Built at: 10/07/2021 3:56:20 PM
Asset Size Chunks Chunk Names
index.js 2.21 MiB 0 [emitted] index
Entrypoint index = index.js
[0] ./src/index.ts 1.09 KiB {0} [built]
[1] ./src/cli.ts 3.5 KiB {0} [built]
[4] external "path" 42 bytes {0} [built]
[5] ../kbn-dev-utils/target/tooling_log/index.js 1.79 KiB {0} [built]
[112] external "util" 42 bytes {0} [built]
[127] ./src/commands/index.ts 1.06 KiB {0} [built]
[130] ./src/utils/fs.ts 3.02 KiB {0} [built]
[133] external "fs" 42 bytes {0} [built]
[143] ./src/utils/log.ts 1.54 KiB {0} [built]
[145] ./src/utils/projects.ts 6.3 KiB {0} [built]
[162] ./src/utils/errors.ts 921 bytes {0} [built]
[163] ./src/utils/project.ts 8.26 KiB {0} [built]
[266] ./src/utils/workspaces.ts 2.82 KiB {0} [built]
[267] ./src/config.ts 2.54 KiB {0} [built]
[480] ./src/production/index.ts 954 bytes {0} [built]
+ 687 hidden modules
ERROR in /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js
Module not found: Error: Can't resolve 'spdx-exceptions' in '/mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse'
# /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js 6:17-43
# /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js
# /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/index.js
# /mnt/ssd/projects/okp4bi/node_modules/normalize-package-data/lib/fixer.js
# /mnt/ssd/projects/okp4bi/node_modules/normalize-package-data/lib/normalize.js
# /mnt/ssd/projects/okp4bi/node_modules/read-pkg/index.js
# ./src/utils/package_json.ts
# ./src/utils/workspaces.ts
# ./src/index.ts
ERROR in /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-correct/index.js
Module not found: Error: Can't resolve 'spdx-license-ids' in '/mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-correct'
# /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-correct/index.js 17:21-48
# /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/index.js
# /mnt/ssd/projects/okp4bi/node_modules/normalize-package-data/lib/fixer.js
# /mnt/ssd/projects/okp4bi/node_modules/normalize-package-data/lib/normalize.js
# /mnt/ssd/projects/okp4bi/node_modules/read-pkg/index.js
# ./src/utils/package_json.ts
# ./src/utils/workspaces.ts
# ./src/index.ts
ERROR in /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js
Module not found: Error: Can't resolve 'spdx-license-ids' in '/mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse'
# /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js 4:10-37
# /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js
# /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/index.js
# /mnt/ssd/projects/okp4bi/node_modules/normalize-package-data/lib/fixer.js
# /mnt/ssd/projects/okp4bi/node_modules/normalize-package-data/lib/normalize.js
# /mnt/ssd/projects/okp4bi/node_modules/read-pkg/index.js
# ./src/utils/package_json.ts
# ./src/utils/workspaces.ts
# ./src/index.ts
ERROR in /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js
Module not found: Error: Can't resolve 'spdx-license-ids/deprecated' in '/mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse'
# /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/scan.js 5:10-48
# /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/index.js
# /mnt/ssd/projects/okp4bi/node_modules/validate-npm-package-license/index.js
# /mnt/ssd/projects/okp4bi/node_modules/normalize-package-data/lib/fixer.js
# /mnt/ssd/projects/okp4bi/node_modules/normalize-package-data/lib/normalize.js
# /mnt/ssd/projects/okp4bi/node_modules/read-pkg/index.js
# ./src/utils/package_json.ts
# ./src/utils/workspaces.ts
# ./src/index.ts
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
│ERROR failure 10 sec
│ERROR Error: Command failed with exit code 2: yarn run build
│ at makeError (/mnt/ssd/projects/okp4bi/packages/kbn-pm/dist/index.js:22616:11)
│ at handlePromise (/mnt/ssd/projects/okp4bi/packages/kbn-pm/dist/index.js:21552:26)
│ at process._tickCallback (internal/process/next_tick.js:68:7)

Related

PackageNotFoundError: Package not found: 'conda' Package 'conda' is not installed in C:\Users\user\AppData\Local\Programs\Python\Python39

my problem started when I tried to use conda create -n nam python3 and got conda.exceptions.CondaRuntimeError:
The following packages will be downloaded:
package | build
---------------------------|-----------------
vs2015_runtime-14.0.25420 | 0 2.0 MB
vc-14 | 0 703 B
python-3.6.2 | 0 31.5 MB
certifi-2016.2.28 | py36_0 214 KB
wheel-0.29.0 | py36_0 129 KB
wincertstore-0.2 | py36_0 14 KB
setuptools-36.4.0 | py36_1 534 KB
pip-9.0.1 | py36_1 1.7 MB
------------------------------------------------------------
Total: 36.0 MB
The following NEW packages will be INSTALLED:
certifi: 2016.2.28-py36_0
pip: 9.0.1-py36_1
python: 3.6.2-0
setuptools: 36.4.0-py36_1
vc: 14-0
vs2015_runtime: 14.0.25420-0
wheel: 0.29.0-py36_0
wincertstore: 0.2-py36_0
Proceed ([y]/n)?
Fetching packages ...
vs2015_runtime 100% |###############################| Time: 0:00:00 3.63 MB/s
vc-14-0.tar.bz 100% |###############################| Time: 0:00:00 140.66 kB/s
python-3.6.2-0 100% |###############################| Time: 0:00:05 5.56 MB/s
certifi-2016.2 100% |###############################| Time: 0:00:00 1.18 MB/s
wheel-0.29.0-p 100% |###############################| Time: 0:00:00 1.02 MB/s
wincertstore-0 100% |###############################| Time: 0:00:00 4.84 MB/s
setuptools-36. 100% |###############################| Time: 0:00:00 1.64 MB/s
pip-9.0.1-py36 100% |###############################| Time: 0:00:01 1.68 MB/s
Extracting packages ...
[ COMPLETE ]|##################################################| 100%
Linking packages ...
An unexpected error has occurred. | 0%
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : win-64
conda version : 4.2.7
conda is private : False
conda-env version : 4.2.7
conda-build version : not installed
python version : 3.9.12.final.0
requests version : 2.28.1
root environment : C:\Users\user\AppData\Local\Programs\Python\Python39 (writable)
default environment : C:\Users\user\AppData\Local\Programs\Python\Python39
envs directories : C:\Users\user\AppData\Local\Programs\Python\Python39\envs
package cache : C:\Users\user\AppData\Local\Programs\Python\Python39\pkgs
channel URLs : https://repo.continuum.io/pkgs/free/win-64/
https://repo.continuum.io/pkgs/free/noarch/
https://repo.continuum.io/pkgs/pro/win-64/
https://repo.continuum.io/pkgs/pro/noarch/
https://repo.continuum.io/pkgs/msys2/win-64/
https://repo.continuum.io/pkgs/msys2/noarch/
config file : None
offline mode : False
$ C:\Users\user\miniconda3\Scripts\conda-script.py create -n nam python
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\install.py", line 201, in yield_lines
with open(path) as fh:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python39\\pkgs\\vs2015_runtime-14.0.25420-0\\info\\has_prefix'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\install.py", line 209, in yield_lines
raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\cli\install.py", line 405, in install
execute_actions(actions, index, verbose=not context.quiet)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\plan.py", line 643, in execute_actions
inst.execute_instructions(plan, index, verbose)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\instructions.py", line 134, in execute_instructions
cmd(state, arg)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\instructions.py", line 78, in LINK_CMD
link(state['prefix'], dist, lt, index=state['index'])
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\install.py", line 943, in link
has_prefix_files = read_has_prefix(join(info_dir, 'has_prefix'))
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\install.py", line 248, in read_has_prefix
return {pr.filepath: (pr.placeholder, pr.filemode) for pr in parsed_lines}
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\install.py", line 248, in <dictcomp>
return {pr.filepath: (pr.placeholder, pr.filemode) for pr in parsed_lines}
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\install.py", line 247, in <genexpr>
parsed_lines = (parse_line(line) for line in yield_lines(path))
RuntimeError: generator raised StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\exceptions.py", line 472, in conda_exception_handler
return_value = func(*args, **kwargs)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\cli\main.py", line 144, in _main
exit_code = args.func(args, p)
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\cli\main_create.py", line 68, in execute
install(args, parser, 'create')
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\conda\cli\install.py", line 420, in install
raise CondaRuntimeError('RuntimeError: %s' % e)
conda.exceptions.CondaRuntimeError: Runtime error: RuntimeError: generator raised StopIteration
my version is conda 4.2 and
I discovered that it's no longer supported, so I used conda update conda and got
PackageNotFoundError: Package not found: 'conda' Package 'conda' is not installed in C:\Users\user\AppData\Local\Programs\Python\Python39
, tried to reinstall anaconda and still got the same error.
"C:\Users\user\AppData\Local\Programs\Python\Python39"
has nothing to do with Anaconda. This the path where standard Python from python.org is installed. Why didn't you mention the 2 Python installations?
Anyhow, before you can use Anaconda you have activate it, preferably using the Anaconda prompt. Only then can you update conda.
And do yourself a favour: Either learn some conda basics from https://conda.io/projects/conda/en/latest/user-guide/getting-started.html
or remove it from your system.

how to config pre-receive rules of gitlab?

I have written the pre-receive script according to the
gitlab docs, and run it on server side.
the rules like this:
#!/usr/bin/env ruby
$refname = ARGV[0]
$oldrev = ARGV[1]
$newrev = ARGV[2]
$user = ENV['USER']
puts "Enforcing Policies..."
puts "(#{$refname}) (#{$oldrev[0,6]}) (#{$newrev[0,6]})"
$regex = /\[ref: (\d+)\]/
# enforced custom commit message format
def check_message_format
missed_revs = `git rev-list #{$oldrev}..#{$newrev}`.split("\n")
missed_revs.each do |rev|
message = `git cat-file commit #{rev} | sed '1,/^$/d'`
if !$regex.match(message)
puts "[POLICY] Your message is not formatted correctly"
exit 1
end
end
end
check_message_format
but,when i push my code to the server. the git bash display like this:
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 276 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: /opt/gitlab/embedded/service/gitlab-shell/hooks/pre-receive.d/pre-receive:9:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
remote: Enforcing Policies...
To http://[ip]/[project].git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://[ip]/[project].git'
What should I do to make this script run normally?

Installing Win32::Unicode::Console fails on Windows 10: Failed test at t/04_print.t

I am trying to install Win32::Unicode::Console on Windows 10. I am using Strawberry Perl. From the command prompt:
> perl --version
This is perl 5, version 30, subversion 1 (v5.30.1) built for MSWin32-x64-multi-thread
> chcp
Active code page: 65001
> perl Makefile.PL
Writing ppport.h
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for Win32::Unicode
Writing MYMETA.yml and MYMETA.json
> gmake
[...]
> gmake test
"C:\Strawberry\perl\bin\perl.exe" "-Iinc" -MExtUtils::Command::MM -e cp_nonempty -- Unicode.bs blib\arch\auto\Win32\Unicode\Unicode.bs 644
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/*.t
t/00_compile.t ........... ok
t/01_load.t .............. ok
t/02_export.t ............ ok
t/03_encode.t ............ ok
t/04_print.t ............. 1/?
# Failed test at t/04_print.t line 14.
# STDOUT is:
# I ⥠Perl
# not:
# I ♥ Perl
# as expected
# Failed test at t/04_print.t line 15.
# STDOUT is:
# [ I ⥠Perl]
# not:
# [ I ♥ Perl]
# as expected
# Failed test at t/04_print.t line 16.
# STDOUT is:
# I ⥠Perl
#
# not:
# I ♥ Perl
#
# as expected
t/04_print.t ............. 5/? # Looks like you failed 3 tests of 13.
t/04_print.t ............. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/13 subtests
t/05_write.t ............. ok
t/06_dir_functions.t ..... ok
t/06_dir_methods.t ....... ok
t/06_dir_tree.t .......... ok
t/07_file.t .............. ok
t/08_error.t ............. ok
t/09_normalize.t ......... ok
t/10_read.t .............. ok
t/10_read_with_offset.t .. ok
t/11_write.t ............. ok
t/12_syswrite.t .......... ok
t/13_system.t ............ ok
t/15_flock.t ............. ok
t/15_flock_win32.t ....... ok
t/16_io_handle_like.t .... ok
t/17_slurp.t ............. ok
t/30_native.t ............ ok
t/31_native_import.t ..... ok
t/32_native_file.t ....... ok
t/33_native_dir.t ........ ok
t/34_args.t .............. ok
t/50_util.t .............. ok
Test Summary Report
-------------------
t/04_print.t (Wstat: 768 Tests: 13 Failed: 3)
Failed tests: 1-3
Non-zero exit status: 3
Files=27, Tests=284, 25 wallclock secs ( 0.16 usr + 0.05 sys = 0.20 CPU)
Result: FAIL
Failed 1/27 test programs. 3/284 subtests failed.
gmake: *** [Makefile:1038: test_dynamic] Error 255
What can be the problem here?

Visualizing decision tree with graphviz: How to solve FileNotFoundError?

I want to visualize a decision tree using graphviz.
I found some example code (https://gist.github.com/WillKoehrsen/ff77f5f308362819805a3defd9495ffd):
from sklearn.datasets import load_iris
iris = load_iris()
# Model (can also use single decision tree)
from sklearn.ensemble import RandomForestClassifier
model = RandomForestClassifier(n_estimators=10)
# Train
model.fit(iris.data, iris.target)
# Extract single tree
estimator = model.estimators_[5]
from sklearn.tree import export_graphviz
# Export as dot file
export_graphviz(estimator, out_file='tree.dot',
feature_names = iris.feature_names,
class_names = iris.target_names,
rounded = True, proportion = False,
precision = 2, filled = True)
# Convert to png using system command (requires Graphviz)
from subprocess import call
call(['dot', '-Tpng', 'tree.dot', '-o', 'tree.png', '-Gdpi=600'])
# Display in jupyter notebook
from IPython.display import Image
Image(filename = 'tree.png')
What it should output:
When I do this with jupyter notebooks, however, I get a FileNotFoundError:
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-3-6d9aafea91ef> in <module>()
21 # Convert to png using system command (requires Graphviz)
22 from subprocess import call
---> 23 call(['dot', '-Tpng', 'tree.dot', '-o', 'tree.png', '-Gdpi=600'])
24
25 # Display in jupyter notebook
C:\ProgramData\Anaconda3\lib\subprocess.py in call(timeout, *popenargs, **kwargs)
302 retcode = call(["ls", "-l"])
303 """
--> 304 with Popen(*popenargs, **kwargs) as p:
305 try:
306 return p.wait(timeout=timeout)
C:\ProgramData\Anaconda3\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
754 c2pread, c2pwrite,
755 errread, errwrite,
--> 756 restore_signals, start_new_session)
757 except:
758 # Cleanup if the child failed starting.
C:\ProgramData\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
1153 env,
1154 os.fspath(cwd) if cwd is not None else None,
-> 1155 startupinfo)
1156 finally:
1157 # Child is launched. Close the parent's copy of those pipe
FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden
(The last one says that my system was not able to find the stated file)
With Anaconda Prompt in admin mode I ran conda install -c anaconda graphviz with no errors:
Collecting package metadata: done
Solving environment: \
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
- defaults/win-64::anaconda==5.3.1=py37_0
- defaults/win-64::astropy==3.0.4=py37hfa6e2cd_0
- defaults/win-64::bkcharts==0.2=py37_0
- defaults/win-64::blaze==0.11.3=py37_0
- defaults/win-64::bokeh==0.13.0=py37_0
- defaults/win-64::bottleneck==1.2.1=py37h452e1ab_1
- defaults/win-64::dask==0.19.1=py37_0
- defaults/win-64::datashape==0.5.4=py37_1
- defaults/win-64::h5py==2.8.0=py37h3bdd7fb_2
- defaults/win-64::imageio==2.4.1=py37_0
- defaults/win-64::matplotlib==2.2.3=py37hd159220_0
- defaults/win-64::mkl-service==1.1.2=py37hb217b18_5
- defaults/win-64::mkl_fft==1.0.4=py37h1e22a9b_1
- defaults/win-64::mkl_random==1.0.1=py37h77b88f5_1
- defaults/win-64::numba==0.39.0=py37h830ac7b_0
- defaults/win-64::numexpr==2.6.8=py37h9ef55f4_0
- defaults/win-64::numpy==1.15.1=py37ha559c80_0
- defaults/win-64::numpy-base==1.15.1=py37h8128ebf_0
- defaults/win-64::odo==0.5.1=py37_0
- defaults/win-64::pandas==0.23.4=py37h830ac7b_0
- defaults/win-64::patsy==0.5.0=py37_0
- defaults/win-64::pytables==3.4.4=py37he6f6034_0
- defaults/win-64::pytest-arraydiff==0.2=py37h39e3cac_0
- defaults/win-64::pytest-astropy==0.4.0=py37_0
- defaults/win-64::pytest-doctestplus==0.1.3=py37_0
- defaults/win-64::pywavelets==1.0.0=py37h452e1ab_0
- defaults/win-64::scikit-image==0.14.0=py37h6538335_1
- defaults/win-64::scikit-learn==0.19.2=py37heebcf9a_0
- defaults/win-64::scipy==1.1.0=py37h4f6bf74_1
- defaults/win-64::seaborn==0.9.0=py37_0
- defaults/win-64::statsmodels==0.9.0=py37h452e1ab_0
done
## Package Plan ##
environment location: C:\ProgramData\Anaconda3
added / updated specs:
- graphviz
The following packages will be downloaded:
package | build
---------------------------|-----------------
ca-certificates-2019.1.23 | 0 158 KB anaconda
certifi-2019.3.9 | py37_0 155 KB anaconda
conda-4.6.12 | py37_1 2.1 MB anaconda
graphviz-2.38.0 | 4 37.7 MB anaconda
openssl-1.1.1 | he774522_0 5.7 MB anaconda
vc-14.1 | h21ff451_3 5 KB anaconda
vs2015_runtime-15.5.2 | 3 2.2 MB anaconda
------------------------------------------------------------
Total: 48.1 MB
The following packages will be UPDATED:
openssl conda-forge::openssl-1.1.1b-hfa6e2cd_2 --> anaconda::openssl-1.1.1-he774522_0
vs2015_runtime pkgs/main::vs2015_runtime-14.15.26706~ --> anaconda::vs2015_runtime-15.5.2-3
The following packages will be SUPERSEDED by a higher-priority channel:
ca-certificates conda-forge::ca-certificates-2019.3.9~ --> anaconda::ca-certificates-2019.1.23-0
certifi conda-forge --> anaconda
conda conda-forge::conda-4.6.12-py37_2 --> anaconda::conda-4.6.12-py37_1
graphviz conda-forge::graphviz-2.38.0-h6538335~ --> anaconda::graphviz-2.38.0-4
vc pkgs/main::vc-14.1-h0510ff6_4 --> anaconda::vc-14.1-h21ff451_3
Proceed ([y]/n)? y
Downloading and Extracting Packages
certifi-2019.3.9 | 155 KB | ############################################################################ | 100%
conda-4.6.12 | 2.1 MB | ############################################################################ | 100%
graphviz-2.38.0 | 37.7 MB | ############################################################################ | 100%
openssl-1.1.1 | 5.7 MB | ############################################################################ | 100%
vc-14.1 | 5 KB | ############################################################################ | 100%
ca-certificates-2019 | 158 KB | ############################################################################ | 100%
vs2015_runtime-15.5. | 2.2 MB | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Suprisingly, it worked just fine when I ran the code on kaggle.com.
Any ideas on what could be the problem and how to solve it?
Just solved this.
The trick was to add the graphviz path to the windows environmental variables, here is a good description: https://bobswift.atlassian.net/wiki/spaces/GVIZ/pages/20971549/How+to+install+Graphviz+software
I restarted my computer after this and voila.

Archive::Zip install fails on Strawberry Perl

I installed Strawberry Perl. I then tried to install Archive::Perl module using CPAN, failed.
I then tried installing other modules like Log::Log4perl, successful.
Platform -
Summary of my perl5 (revision 5 version 20 subversion 1) configuration:
Platform:
osname=MSWin32, osvers=6.3, archname=MSWin32-x64-multi-thread
uname='Win32 strawberry-perl 5.20.1.1 #1 Mon Sep 15 13:26:45 2014 x64'
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
useithreads=define, usemultiplicity=define
use64bitint=define, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields',
optimize='-s -O2',
cppflags='-DWIN32'
ccversion='', gccversion='4.8.3', gccosandvers=''
Error Summary -
Test Summary Report
-------------------
t/02_main.t (Wstat: 512 Tests: 47 Failed: 7)
Failed tests: 25, 32-34, 38, 46-47
Non-zero exit status: 2
Parse errors: Bad plan. You planned 141 tests but ran 47.
t/03_ex.t (Wstat: 1536 Tests: 17 Failed: 6)
Failed tests: 4, 6, 10, 13-14, 16
Non-zero exit status: 6
Files=16, Tests=140, 9 wallclock secs ( 0.09 usr + 0.13 sys = 0.22 CPU)
Result: FAIL
Failed 2/16 test programs. 13/140 subtests failed.
dmake.exe: Error code 255, while making 'test_dynamic'
PHRED/Archive-Zip-1.39.tar.gz
C:\STRAWB~1\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports PHRED/Archive-Zip-1.39.tar.gz
Stopping: 'install' failed for 'Archive::Zip'.
Failed during this command:
PHRED/Archive-Zip-1.39.tar.gz : make_test NO
Complete install output -
cpan> install Archive::Zip
Running install for module 'Archive::Zip'
Checksum for C:\STRAWB~1\cpan\sources\authors\id\P\PH\PHRED\Archive-Zip-1.39.tar.gz ok
Configuring P/PH/PHRED/Archive-Zip-1.39.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for Archive::Zip
Writing MYMETA.yml and MYMETA.json
PHRED/Archive-Zip-1.39.tar.gz
C:\strawberry\perl\bin\perl.exe Makefile.PL make=dmake -- OK
Running make for P/PH/PHRED/Archive-Zip-1.39.tar.gz
cp lib/Archive/Zip/ZipFileMember.pm blib\lib\Archive\Zip\ZipFileMember.pm
cp lib/Archive/Zip/MockFileHandle.pm blib\lib\Archive\Zip\MockFileHandle.pm
cp lib/Archive/Zip/DirectoryMember.pm blib\lib\Archive\Zip\DirectoryMember.pm
cp lib/Archive/Zip/FileMember.pm blib\lib\Archive\Zip\FileMember.pm
cp lib/Archive/Zip/NewFileMember.pm blib\lib\Archive\Zip\NewFileMember.pm
cp lib/Archive/Zip/MemberRead.pm blib\lib\Archive\Zip\MemberRead.pm
cp lib/Archive/Zip/Member.pm blib\lib\Archive\Zip\Member.pm
cp lib/Archive/Zip/Tree.pm blib\lib\Archive\Zip\Tree.pm
cp lib/Archive/Zip/Archive.pm blib\lib\Archive\Zip\Archive.pm
cp lib/Archive/Zip/FAQ.pod blib\lib\Archive\Zip\FAQ.pod
cp lib/Archive/Zip/BufferedFileHandle.pm blib\lib\Archive\Zip\BufferedFileHandle.pm
cp lib/Archive/Zip.pm blib\lib\Archive\Zip.pm
cp lib/Archive/Zip/StringMember.pm blib\lib\Archive\Zip\StringMember.pm
"C:\strawberry\perl\bin\perl.exe" -MExtUtils::Command -e cp -- script/crc32 blib\script\crc32
pl2bat.bat blib\script\crc32
PHRED/Archive-Zip-1.39.tar.gz
C:\STRAWB~1\c\bin\dmake.exe -- OK
Running make test
"C:\strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\li
b', 'blib\arch')" t/*.t
t/01_compile.t ................ ok
t/02_main.t ................... The process cannot access the file because it is being used by another process.
warning: C:\strawberry\perl\bin\perl.exe -pe "BEGIN{binmode(STDIN);binmode(STDOUT)}" doesn't seem to work, may skip some tests at t/common.p
m line 189.
t/02_main.t ................... 1/141
# Failed test at t/02_main.t line 95.
# got: 'testdir/RwLiD4dp9b/'
# expected: 'testdir\RwLiD4dp9b/'
error: member not found
at C:\STRAWB~1\cpan\build\Archive-Zip-1.39-UHv240\blib\lib/Archive/Zip/Archive.pm line 185.
Archive::Zip::Archive::extractMember(Archive::Zip::Archive=HASH(0x3123628), "testdir\\RwLiD4dp9b/") called at t/02_main.t line 128
# Failed test at t/02_main.t line 129.
# got: '2'
# expected: '0'
# Failed test at t/02_main.t line 130.
# Failed test at t/02_main.t line 133.
# Failed test at t/02_main.t line 146.
# got: 'testdir/RwLiD4dp9b/string.txt'
# expected: 'testdir\RwLiD4dp9b/string.txt'
error: member not found
at C:\STRAWB~1\cpan\build\Archive-Zip-1.39-UHv240\blib\lib/Archive/Zip/Archive.pm line 185.
Archive::Zip::Archive::extractMember(Archive::Zip::Archive=HASH(0x3123628), "testdir\\RwLiD4dp9b/string.txt") called at t/02_main.t
line 175
# Failed test at t/02_main.t line 176.
# got: '2'
# expected: '0'
# Failed test at t/02_main.t line 177.
Can't use an undefined value as a symbol reference at t/common.pm line 163.
# Looks like you planned 141 tests but ran 47.
# Looks like you failed 7 tests of 47 run.
# Looks like your test exited with 2 just after 47.
t/02_main.t ................... Dubious, test returned 2 (wstat 512, 0x200)
Failed 101/141 subtests
(less 3 skipped subtests: 37 okay)
t/03_ex.t ..................... The process cannot access the file because it is being used by another process.
warning: C:\strawberry\perl\bin\perl.exe -pe "BEGIN{binmode(STDIN);binmode(STDOUT)}" doesn't seem to work, may skip some tests at t/common.p
m line 189.
t/03_ex.t ..................... 1/17 error: member not found
at C:\STRAWB~1\cpan\build\Archive-Zip-1.39-UHv240\blib\lib/Archive/Zip/Archive.pm line 185.
Archive::Zip::Archive::extractMember(Archive::Zip::Archive=HASH(0x4c8468), "testdir\\cq6T6jDiTJ/testing.txt") called at examples/ext
ract.pl line 34
Extracting testdir\cq6T6jDiTJ/testing.txt from C:\Users\amurty\AppData\Local\Temp\testout-P4oqi.zip failed
t/03_ex.t ..................... 4/17 # Failed test at t/03_ex.t line 37.
# got: '65280'
# expected: '0'
Can't call method "desiredCompressionLevel" on an undefined value at C:\STRAWB~1\cpan\build\Archive-Zip-1.39-UHv240\blib\lib/Archive/Zip/Arc
hive.pm line 257.
# Failed test at t/03_ex.t line 41.
# got: '512'
# expected: '0'
t/03_ex.t ..................... 8/17
# Failed test at t/03_ex.t line 55.
# got: 'testdir/cq6T6jDiTJ/testing.txt:100
# '
# expected: 'testdir\cq6T6jDiTJ/testing.txt:100
# '
error: testdir\cq6T6jDiTJ\testing.txt is neither a file nor a directory
at C:\STRAWB~1\cpan\build\Archive-Zip-1.39-UHv240\blib\lib/Archive/Zip/Archive.pm line 355.
Archive::Zip::Archive::addFileOrDirectory(Archive::Zip::Archive=HASH(0x458588), "testdir\\cq6T6jDiTJ\\testing.txt") called at exampl
es/selfex.pl line 28
# Failed test 'extracted\testdir\cq6T6jDiTJ\testing.txt exists'
# at t/03_ex.t line 69.
# got: undef
# expected: '1'
error: Can't rename C:\Users\amurty\AppData\Local\Temp\testout-P4oqi.zip as C:\Users\amurty\AppData\Local\Temp\testout-P4oqi.zbk Permission
denied
at C:\STRAWB~1\cpan\build\Archive-Zip-1.39-UHv240\blib\lib/Archive/Zip/Archive.pm line 472.
Archive::Zip::Archive::overwriteAs(Archive::Zip::Archive=HASH(0x637a98), "C:\\Users\\amurty\\AppData\\Local\\Temp\\testout-P4oqi.zip
") called at C:\STRAWB~1\cpan\build\Archive-Zip-1.39-UHv240\blib\lib/Archive/Zip/Archive.pm line 440
Archive::Zip::Archive::overwrite(Archive::Zip::Archive=HASH(0x637a98)) called at examples/updateTree.pl line 28
t/03_ex.t ..................... 14/17 # Failed test 'updateTree.pl create'
# at t/03_ex.t line 78.
# got: '512'
# expected: '0'
error: Can't rename C:\Users\amurty\AppData\Local\Temp\testout-P4oqi.zip as C:\Users\amurty\AppData\Local\Temp\testout-P4oqi.zbk Permission
denied
at C:\STRAWB~1\cpan\build\Archive-Zip-1.39-UHv240\blib\lib/Archive/Zip/Archive.pm line 472.
Archive::Zip::Archive::overwriteAs(Archive::Zip::Archive=HASH(0x4e7a98), "C:\\Users\\amurty\\AppData\\Local\\Temp\\testout-P4oqi.zip
") called at C:\STRAWB~1\cpan\build\Archive-Zip-1.39-UHv240\blib\lib/Archive/Zip/Archive.pm line 440
Archive::Zip::Archive::overwrite(Archive::Zip::Archive=HASH(0x4e7a98)) called at examples/updateTree.pl line 28
# Failed test 'updateTree.pl update'
# at t/03_ex.t line 81.
# got: '512'
# expected: '0'
# Looks like you failed 6 tests of 17.
t/03_ex.t ..................... Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/17 subtests
t/04_readmember.t ............. The process cannot access the file because it is being used by another process.
warning: C:\strawberry\perl\bin\perl.exe -pe "BEGIN{binmode(STDIN);binmode(STDOUT)}" doesn't seem to work, may skip some tests at t/common.p
m line 189.
t/04_readmember.t ............. ok
t/05_tree.t ................... The process cannot access the file because it is being used by another process.
warning: C:\strawberry\perl\bin\perl.exe -pe "BEGIN{binmode(STDIN);binmode(STDOUT)}" doesn't seem to work, may skip some tests at t/common.p
m line 189.
t/05_tree.t ................... ok
t/06_update.t ................. The process cannot access the file because it is being used by another process.
warning: C:\strawberry\perl\bin\perl.exe -pe "BEGIN{binmode(STDIN);binmode(STDOUT)}" doesn't seem to work, may skip some tests at t/common.p
m line 189.
t/06_update.t ................. ok
t/07_filenames_of_0.t ......... The process cannot access the file because it is being used by another process.
warning: C:\strawberry\perl\bin\perl.exe -pe "BEGIN{binmode(STDIN);binmode(STDOUT)}" doesn't seem to work, may skip some tests at t/common.p
m line 189.
t/07_filenames_of_0.t ......... ok
t/08_readmember_record_sep.t .. skipped: Ignoring failing tests on Win32
t/09_output_record_sep.t ...... ok
t/10_chmod.t .................. The process cannot access the file because it is being used by another process.
warning: C:\strawberry\perl\bin\perl.exe -pe "BEGIN{binmode(STDIN);binmode(STDOUT)}" doesn't seem to work, may skip some tests at t/common.p
m line 189.
t/10_chmod.t .................. ok
t/11_explorer.t ............... ok
t/12_bug_47223.t .............. ok
t/13_bug_46303.t .............. ok
t/14_leading_separator.t ...... The process cannot access the file because it is being used by another process.
warning: C:\strawberry\perl\bin\perl.exe -pe "BEGIN{binmode(STDIN);binmode(STDOUT)}" doesn't seem to work, may skip some tests at t/common.p
m line 189.
t/14_leading_separator.t ...... ok
t/15_decrypt.t ................ ok
t/16_decrypt.t ................ ok
Test Summary Report
-------------------
t/02_main.t (Wstat: 512 Tests: 47 Failed: 7)
Failed tests: 25, 32-34, 38, 46-47
Non-zero exit status: 2
Parse errors: Bad plan. You planned 141 tests but ran 47.
t/03_ex.t (Wstat: 1536 Tests: 17 Failed: 6)
Failed tests: 4, 6, 10, 13-14, 16
Non-zero exit status: 6
Files=16, Tests=140, 9 wallclock secs ( 0.09 usr + 0.13 sys = 0.22 CPU)
Result: FAIL
Failed 2/16 test programs. 13/140 subtests failed.
dmake.exe: Error code 255, while making 'test_dynamic'
PHRED/Archive-Zip-1.39.tar.gz
C:\STRAWB~1\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports PHRED/Archive-Zip-1.39.tar.gz
Stopping: 'install' failed for 'Archive::Zip'.
Failed during this command:
PHRED/Archive-Zip-1.39.tar.gz : make_test NO
cpan>
they changed something, because it works now.
Running make test
"C:\strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\li
b', 'blib\arch')" t/*.t
t/01_compile.t ................ ok
t/02_main.t ................... ok
t/03_ex.t ..................... ok
t/04_readmember.t ............. ok
t/05_tree.t ................... ok
t/06_update.t ................. ok
t/07_filenames_of_0.t ......... ok
t/08_readmember_record_sep.t .. skipped: Ignoring failing tests on Win32
t/09_output_record_sep.t ...... ok
t/10_chmod.t .................. ok
t/11_explorer.t ............... ok
t/12_bug_47223.t .............. ok
t/13_bug_46303.t .............. ok
t/14_leading_separator.t ...... ok
t/15_decrypt.t ................ ok
t/16_decrypt.t ................ ok
t/17_101092.t ................. ok
t/18_bug_92205.t .............. ok
t/19_bug_101240.t ............. ok
All tests successful.
Files=19, Tests=272, 10 wallclock secs ( 0.09 usr + 0.14 sys = 0.23 CPU)
Result: PASS
Archive::Zip is up to date (1.46).

Resources