bin/sh: 1: visqol: not found - python

When I execute my code it shows me error as below, I don't know what is this visqol_find.py:33 ERROR: /bin/sh: 1: visqol: not found meaning, and I pretty sure that visqol_value and visqol_threshold are both defined as float because the program is working fine with my professor.
My system is Ubuntu 18.04 and python is 3.6.12.
This is code for visqol_value
def visqol(reference_file: str, degraded_file: str, visqol_model_path: str = __visqol_model_path__) -> float:
status, output = subprocess.getstatusoutput("visqol --reference_file {} --degraded_file {} --similarity_to_quality_model {} --use_speech_mode".format(reference_file, degraded_file, visqol_model_path))
if status != 0:
for _line_ in output.split('\n'):
logger.error(_line_)
raise RuntimeError("VISQOL Command-Line Error.")
visqol_score = None
for output_line in output.split("\n"):
if output_line.startswith('MOS-LQO:'):
visqol_score = float(output_line.split()[1])
if visqol_score is not None:
return visqol_score
raise RuntimeError("VISQOL Command-Line Error.")
visqol_value = visqol(clip_file, adversarial_path)
if visqol_value < visqol_threshold:
right_bound = potential_delta
if _delete_failed_wav_: # delete
for _file_ in glob.glob(adversarial_path[:-4] + "*"):
os.remove(_file_)
logger.debug("VISQOL Exceeds for music clip '{}' with 'delta_db={}'.".format(clip_name, potential_delta))
continue
This is code for visqol_threshold
def get_visqol_threshold(formant_weight: Union[list, np.ndarray], phoneme_num: int) -> float:
formant_weight = np.array(formant_weight)
_alpha = 0.95 # The higher the value of _alpha and _beta is, the faster the visqol threshold decreases.
_beta = 8.0
_theta = 10.0
o = np.sum(formant_weight != 0.)
if o == 5:
base = 1.7
elif o == 4:
base = 1.8
elif o == 3:
base = 2.2
else:
if formant_weight[1] < 0.75:
base = 2.3
else:
base = 2.25
return base * (_alpha ** (max((phoneme_num - _theta) / _beta, 0.)))
I would like to know how I should fix it?
Since I am running this project in a virtual python environment, is it possible that it is because I put visqol in the wrong place, and if so, where should I download visqol to
The program works but keeps looping with these two error messages until I manually terminate it
(.venv) dunliu#dun:~/research/Phantom-of-Formants-master$ python3 2022gen_100song_bing_001.py
2022-11-13 17:23:58 2022gen_100song_bing_001.py:433 WARNING: The destination folder './task/weather1/generate/0490c9606d8e333e' will be removed. Please backup this folder, and then enter 'Y' to continue, or others to exit...
y
2022-11-13 17:24:01 2022gen_100song_bing_001.py:437 INFO: The destination folder './task/weather1/generate/0490c9606d8e333e' was removed.
2022-11-13 17:24:01 2022gen_100song_bing_001.py:325 INFO: ******************** Start Binary-search Generation. ********************
2022-11-13 17:24:01 visqol_find.py:34 ERROR: /bin/sh: 1: visqol: not found
2022-11-13 17:24:01 utils.py:361 ERROR: program exit!
Traceback (most recent call last):
File "/home/dunliu/research/Phantom-of-Formants-master/utils.py", line 357, in wrapper
return function(*args, **kwargs)
File "/home/dunliu/research/Phantom-of-Formants-master/visqol_find.py", line 35, in visqol
raise RuntimeError("VISQOL Command-Line Error.")
RuntimeError: VISQOL Command-Line Error.
2022-11-13 17:24:01 utils.py:361 ERROR: program exit!
Traceback (most recent call last):
File "/home/dunliu/research/Phantom-of-Formants-master/utils.py", line 357, in wrapper
return function(*args, **kwargs)
File "2022gen_100song_bing_001.py", line 257, in generate
if visqol_value < visqol_threshold:
TypeError: '<' not supported between instances of 'NoneType' and 'float'
2022-11-13 17:24:01 visqol_find.py:34 ERROR: /bin/sh: 1: visqol: not found
2022-11-13 17:24:01 utils.py:361 ERROR: program exit!
Traceback (most recent call last):
File "/home/dunliu/research/Phantom-of-Formants-master/utils.py", line 357, in wrapper
return function(*args, **kwargs)
File "/home/dunliu/research/Phantom-of-Formants-master/visqol_find.py", line 35, in visqol
raise RuntimeError("VISQOL Command-Line Error.")
RuntimeError: VISQOL Command-Line Error.
2022-11-13 17:24:01 utils.py:361 ERROR: program exit!
Traceback (most recent call last):
File "/home/dunliu/research/Phantom-of-Formants-master/utils.py", line 357, in wrapper
return function(*args, **kwargs)
File "2022gen_100song_bing_001.py", line 257, in generate
if visqol_value < visqol_threshold:
TypeError: '<' not supported between instances of 'NoneType' and 'float'
after I terminate it, it shows
^CTraceback (most recent call last):
File "2022gen_100song_bing_001.py", line 448, in <module>
binary_generation_task()
File "2022gen_100song_bing_001.py", line 444, in binary_generation_task
binary_generation(params)
File "2022gen_100song_bing_001.py", line 395, in binary_generation
generate(_wake_up_analysis_file_, _command_analysis_file_, _clip_file_, output_folder, params)
File "/home/dunliu/research/Phantom-of-Formants-master/utils.py", line 359, in wrapper
raise _err
File "/home/dunliu/research/Phantom-of-Formants-master/utils.py", line 357, in wrapper
return function(*args, **kwargs)
File "2022gen_100song_bing_001.py", line 251, in generate
adversarial_path = gen_by_command(delta_db_list, bandwidth_list, command_analysis_file, clip_file, output_folder, adversarial_filename, params)
File "/home/dunliu/research/Phantom-of-Formants-master/utils.py", line 359, in wrapper
raise _err
File "/home/dunliu/research/Phantom-of-Formants-master/utils.py", line 357, in wrapper
return function(*args, **kwargs)
File "/home/dunliu/research/Phantom-of-Formants-master/formant_processor.py", line 688, in gen_by_command
command_filter_list = generate_filter(command_formant_list, m_sample_rate, bandwidth, min_fre, max_fre, filter_order, reserved_fre_gap_ratio)
File "/home/dunliu/research/Phantom-of-Formants-master/formant_processor.py", line 356, in generate_filter
signal.butter(f_order, [_s_fre_, _e_fre_], btype='band', output='sos')
File "/home/dunliu/research/Phantom-of-Formants-master/.venv/lib/python3.6/site-packages/scipy/signal/filter_design.py", line 2894, in butter
output=output, ftype='butter', fs=fs)
File "/home/dunliu/research/Phantom-of-Formants-master/.venv/lib/python3.6/site-packages/scipy/signal/filter_design.py", line 2407, in iirfilter
return zpk2sos(z, p, k)
File "/home/dunliu/research/Phantom-of-Formants-master/.venv/lib/python3.6/site-packages/scipy/signal/filter_design.py", line 1447, in zpk2sos
z = np.concatenate(_cplxreal(z))
File "/home/dunliu/research/Phantom-of-Formants-master/.venv/lib/python3.6/site-packages/scipy/signal/filter_design.py", line 887, in _cplxreal
z = atleast_1d(z)
File "<__array_function__ internals>", line 6, in atleast_1d
File "/home/dunliu/research/Phantom-of-Formants-master/.venv/lib/python3.6/site-packages/numpy/core/shape_base.py", line 25, in atleast_1d
#array_function_dispatch(_atleast_1d_dispatcher)
KeyboardInterrupt

The error message is from /bin/sh. That means you are expecting your (bash/dash/other) shell to execute a Python script which isn't going to work.
You need to either put a Python shebang as the first line of your script, e.g.
#!/usr/bin/env python3
...
... rest of script
then make it executable with:
chmod +x YOURSCRIPT.PY
and run with:
./YOURSCRIPT.PY
Or, you need to start it like this, specifically with the Python interpreter:
python3 YOURSCRIPT.PY

Because you didn't specify the visqol's absolute path in the shell script, your code couldn't call the visqol.
I suggest specifying the visqol's absolute path.
try the command below in your shell ( Or your terminal ).
which visqol
If the path exist, then replace "visqol" in the code below with the result above.
status, output = subprocess.getstatusoutput("visqol --reference_file {} --degraded_file {} --similarity_to_quality_model {} --use_speech_mode".format(reference_file, degraded_file, visqol_model_path))
It looks like "~~ getstatusoutput("/absolute/path/visqol --reference_file ~~"
If not, install "visqol" via the code below in your shell (OR terminal) and try the solution above.
# install bazel to build visqol
# https://bazel.build/install/ubuntu
sudo apt install apt-transport-https curl gnupg
sudo apt update && sudo apt install bazel
sudo apt update && sudo apt full-upgrade
# install numpy python library.
# https://github.com/google/visqol#linuxmac-build-instructions
pip install numpy
# download source code and build visqol
# https://github.com/google/visqol#linuxmac-build-instructions
git clone https://github.com/google/visqol.git
cd visqol
bazel build :visqol -c opt

Related

Using gym atari (version 0.9.5) in python on windows

Im trying to install the gym atari package on version 0.9.5 (I specifically need this version), but when I run the code (which is supposed to be running smoothly if gym is properly downloaded), I get the following error:
AttributeError: 'AtariEnv' object has no attribute 'viewer'
The problem occurred when I tried to run gym.make().
Does anyone know how to fix this?
The same behavior happened to me with python 3.9, but for some reason not on python 3.8 (there was a different error there). Maybe Im missing some rendering library?
The full error message is:
[2021-05-22 02:17:05,405] Making new env: PongNoFrameskip-v4
C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\gym\envs\registration.py:17: PkgResourcesDeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.
result = entry_point.load(False)
Traceback (most recent call last):
File "C:/Users/1/PycharmProjects/University Homework/Reinforcement Learning/dqn/main.py", line 61, in <module>
env = get_env(task, seed)
File "C:\Users\1\PycharmProjects\University Homework\Reinforcement Learning\dqn\utils\gym.py", line 13, in get_env
env = gym.make(env_id)
File "C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\gym\envs\registration.py", line 164, in make
return registry.make(id)
File "C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\gym\envs\registration.py", line 122, in make
env = spec.make()
File "C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\gym\envs\registration.py", line 89, in make
env = cls(**self._kwargs)
File "C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\gym\envs\atari\atari_env.py", line 32, in __init__
self.game_path = atari_py.get_game_path(game)
File "C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\atari_py\games.py", line 20, in get_game_path
raise Exception('ROM is missing for %s, see https://github.com/openai/atari-py#roms for instructions' % (game_name,))
Exception: ROM is missing for pong, see https://github.com/openai/atari-py#roms for instructions
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\gym\utils\closer.py", line 67, in close
closeable.close()
File "C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\gym\core.py", line 164, in close
self.render(close=True)
File "C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\gym\core.py", line 150, in render
return self._render(mode=mode, close=close)
File "C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\gym\envs\atari\atari_env.py", line 109, in _render
if self.viewer is not None:
AttributeError: 'AtariEnv' object has no attribute 'viewer'
Exception ignored in: <function Env.__del__ at 0x00000203EE2174C8>
Traceback (most recent call last):
File "C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\gym\core.py", line 203, in __del__
self.close()
File "C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\gym\core.py", line 164, in close
self.render(close=True)
File "C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\gym\core.py", line 150, in render
return self._render(mode=mode, close=close)
File "C:\Users\1\PycharmProjects\University Homework\venv37\lib\site-packages\gym\envs\atari\atari_env.py", line 109, in _render
if self.viewer is not None:
AttributeError: 'AtariEnv' object has no attribute 'viewer'
Also, the relevant code:
if __name__ == '__main__':
# Get Atari games.
benchmark = gym.benchmark_spec('Atari40M')
# Change the index to select a different game.
task = benchmark.tasks[3]
# Run training
seed = 0 # Use a seed of zero (you may want to randomize the seed!)
env = get_env(task, seed)
And get_env is:
def get_env(task, seed):
env_id = task.env_id
env = gym.make(env_id)
set_global_seeds(seed)
env.seed(seed)
expt_dir = 'tmp/gym-results'
env = wrappers.Monitor(env, expt_dir, force=True)
env = wrap_deepmind(env)
return env
The error looks like the Atari ROM for pong is not found. This is probably due to the fact that gym no longer installs ROMs automatically, due to licensing issues.
But there's an easy workaround now:
pip install -U gym
pip install -U gym[atari,accept-rom-license]
The accept-rom-license option installs a package called autorom which provides the AutoROM command, and runs it automatically with the --accept-rom-license option.
Then everything just works normally.
Details:
If you run AutoROM without the --accept-license option, this is what you get, so be warned:
AutoROM will download the Atari 2600 ROMs.
They will be installed to:
[...]/site-packages/AutoROM/roms
Existing ROMs will be overwritten.
I own a license to these Atari 2600 ROMs.
I agree to not distribute these ROMs and wish to proceed: [Y/n]:
Run AutoROM --help for more options.

Issue while installing pip python

i installed python 3.7.2 still pip was not installed,for pip there must be pip.exe in folder script in directory where python is installed but in my device there nothing in it.
later i tried to install it by running get-pip.py but it throws an exception in command prompt
Command prompt throws exception :-
Installing collected packages: pip, setuptools, wheel Exception: Traceback (most recent call last):
File "C:\Users\Del$in\AppData\Local\Programs\Python\Python37\lib\distutils\uti l.py", line 187, in subst_vars return re.sub(r'\$([a-zA-Z_][a-zA-Z_0-9]*)', _subst, s)
File "C:\Users\Del$in\AppData\Local\Programs\Python\Python37\lib\re.py", line 192, in sub return _compile(pattern, flags).sub(repl, string, count)
File "C:\Users\Del$in\AppData\Local\Programs\Python\Python37\lib\distutils\uti l.py", line 184, in _subst return os.environ[var_name]
File "C:\Users\Del$in\AppData\Local\Programs\Python\Python37\lib\os.py", line 678, in getitem raise KeyError(key) from None KeyError: 'in'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Del$in\AppData\Local\Temp\tmpwzho1r2w\pip.zip\pip_internal\cli \base_command.py", line 179, in main status = self.run(options, args)
File "C:\Users\Del$in\AppData\Local\Temp\tmpwzho1r2w\pip.zip\pip_internal\com mands\install.py", line 393, in run use_user_site=options.use_user_site,
File "C:\Users\Del$in\AppData\Local\Temp\tmpwzho1r2w\pip.zip\pip_internal\req __init__.py", line 57, in install_given_reqs **kwargs
File "C:\Users\Del$in\AppData\Local\Temp\tmpwzho1r2w\pip.zip\pip_internal\req \req_install.py", line 913, in install use_user_site=use_user_site, pycompile=pycompile,
File "C:\Users\Del$in\AppData\Local\Temp\tmpwzho1r2w\pip.zip\pip_internal\req \req_install.py", line 445, in move_wheel_files warn_script_location=warn_script_location,
File "C:\Users\Del$in\AppData\Local\Temp\tmpwzho1r2w\pip.zip\pip_internal\whe el.py", line 320, in move_wheel_files prefix=prefix,
File "C:\Users\Del$in\AppData\Local\Temp\tmpwzho1r2w\pip.zip\pip_internal\loc ations.py", line 180, in distutils_scheme i.finalize_options()
File "C:\Users\Del$in\AppData\Local\Programs\Python\Python37\lib\distutils\com mand\install.py", line 307, in finalize_options self.expand_basedirs()
File "C:\Users\Del$in\AppData\Local\Programs\Python\Python37\lib\distutils\com mand\install.py", line 475, in expand_basedirs self._expand_attrs(['install_base', 'install_platbase', 'root'])
File "C:\Users\Del$in\AppData\Local\Programs\Python\Python37\lib\distutils\com mand\install.py", line 469, in _expand_attrs val = subst_vars(val, self.config_vars)
File "C:\Users\Del$in\AppData\Local\Programs\Python\Python37\lib\distutils\uti l.py", line 189, in subst_vars raise ValueError("invalid variable '$%s'" % var) ValueError: invalid variable '$'in''
I'm certain that your username is the reason for this error. Python is trying to create a string of your username but the $ is causing issues. You can see this in the line ValueError: invalid variable '$'in''. Although there are other solutions, changing your username to DelSin will prevent many other headaches too.
From the code in distutils/utils.py:
def subst_vars (s, local_vars):
"""Perform shell/Perl-style variable substitution on 'string'. Every
occurrence of '$' followed by a name is considered a variable, and
variable is substituted by the value found in the 'local_vars'
dictionary, or in 'os.environ' if it's not in 'local_vars'.
'os.environ' is first checked/augmented to guarantee that it contains
certain values: see 'check_environ()'. Raise ValueError for any
variables not found in either 'local_vars' or 'os.environ'.
"""
This is utilizing the utility that's quite common in bash/Perl scripting, where you can substitute in a value using $:
SOMEPATH='$HOME/somefolder'
echo($SOMEPATH)
# '/path/to/somefolder'
Your username, unfortunately, mimics this and will cause problems until it is changed

f2py fails to run - error in CompaqVisualFCompiler, with no compaq compiler installed

I'm trying to use f2py (under anaconda 2, windows 7 64bit, python 2.7.13) but I run into the following error repeatedly, even when simply trying to list available compilers:
(C:\Users\UserName\Anaconda2) C:\Users\UserName\Desktop\fortran>f2py -c --help-fco
mpiler
(C:\Users\UserName\Anaconda2) C:\Users\UserName\Desktop\fortran>call "C:\Users\UserName\
Anaconda2\Scripts\\..\python.exe" "C:\Users\UserName\Anaconda2\Scripts\\f2py
.py" -c --help-fcompiler
Unexpected ValueError in C:\Users\UserName\Anaconda2\lib\site-packages\numpy\dist
utils\fcompiler\compaq.pyc
Traceback (most recent call last):
File "C:\Users\UserName\Anaconda2\Scripts\\f2py.py", line 28, in <module>
main()
File "C:\Users\UserName\Anaconda2\lib\site-packages\numpy\f2py\f2py2e.py", line
648, in main
run_compile()
File "C:\Users\UserName\Anaconda2\lib\site-packages\numpy\f2py\f2py2e.py", line
633, in run_compile
setup(ext_modules=[ext])
File "C:\Users\UserName\Anaconda2\lib\site-packages\numpy\distutils\core.py", l
ine 169, in setup
return old_setup(**new_attr)
File "C:\Users\UserName\Anaconda2\lib\distutils\core.py", line 137, in setup
ok = dist.parse_command_line()
File "C:\Users\UserName\Anaconda2\lib\distutils\dist.py", line 467, in parse_co
mmand_line
args = self._parse_command_opts(parser, args)
File "C:\Users\UserName\Anaconda2\lib\distutils\dist.py", line 576, in _parse_c
ommand_opts
func()
File "C:\Users\UserName\Anaconda2\lib\site-packages\numpy\distutils\command\con
fig_compiler.py", line 15, in show_fortran_compilers
show_fcompilers(dist)
File "C:\Users\UserName\Anaconda2\lib\site-packages\numpy\distutils\fcompiler\_
_init__.py", line 882, in show_fcompilers
load_all_fcompiler_classes()
File "C:\Users\UserName\Anaconda2\lib\site-packages\numpy\distutils\fcompiler\_
_init__.py", line 740, in load_all_fcompiler_classes
__import__ (module_name)
File "C:\Users\UserName\Anaconda2\lib\site-packages\numpy\distutils\fcompiler\c
ompaq.py", line 57, in <module>
class CompaqVisualFCompiler(FCompiler):
File "C:\Users\UserName\Anaconda2\lib\site-packages\numpy\distutils\fcompiler\c
ompaq.py", line 100, in CompaqVisualFCompiler
raise e
ValueError: [u'path', u'include']
(C:\Users\UserName\Anaconda2) C:\Users\UserName\Desktop\fortran>
I've installed minGW for anaconda (via conda install mingw), so it should detect and run that. I'm not too sure but it seems like it's trying to find the compaq one instead and failing at that? Here's the relevant section of compaq.py (line 100 is the final line):
if sys.platform=='win32':
from numpy.distutils.msvccompiler import MSVCCompiler
try:
m = MSVCCompiler()
m.initialize()
ar_exe = m.lib
except DistutilsPlatformError:
pass
except AttributeError:
msg = get_exception()
if '_MSVCCompiler__root' in str(msg):
print('Ignoring "%s" (I think it is msvccompiler.py bug)' % (msg))
else:
raise
except IOError:
e = get_exception()
if not "vcvarsall.bat" in str(e):
print("Unexpected IOError in", __file__)
raise e
except ValueError:
e = get_exception()
if not "path']" in str(e):
print("Unexpected ValueError in", __file__)
raise e

gclient sync failed when downloading chromium

I'm doing gclient sync in linux and windows and in both I'm getting the same error after around 15 min.
Traceback (most recent call last):
File "/home/jgd/dev/depot_tools/gclient.py", line 2295, in <module>
sys.exit(main(sys.argv[1:]))
File "/home/jgd/dev/depot_tools/gclient.py", line 2281, in main
return dispatcher.execute(OptionParser(), argv)
File "/home/jgd/dev/depot_tools/subcommand.py", line 252, in execute
return command(parser, args[1:])
File "/home/jgd/dev/depot_tools/gclient.py", line 2030, in CMDsync
ret = client.RunOnDeps('update', args)
File "/home/jgd/dev/depot_tools/gclient.py", line 1340, in RunOnDeps
work_queue.flush(revision_overrides, command, args, options=self._options)
File "/home/jgd/dev/depot_tools/gclient_utils.py", line 1047, in run
self.item.run(*self.args, **self.kwargs)
File "/home/jgd/dev/depot_tools/gclient.py", line 766, in run
self.ParseDepsFile()
File "/home/jgd/dev/depot_tools/gclient.py", line 562, in ParseDepsFile
gclient_eval.Check(deps_content, filepath, global_scope, local_scope)
File "/home/jgd/dev/depot_tools/gclient_eval.py", line 240, in Check
result_scope = _gclient_exec(content, global_scope, filename=path)
File "/home/jgd/dev/depot_tools/gclient_eval.py", line 185, in _gclient_exec
_visit_in_module(stmt)
File "/home/jgd/dev/depot_tools/gclient_eval.py", line 169, in _visit_in_module
value = _gclient_eval(node.value, global_scope, filename=filename)
File "/home/jgd/dev/depot_tools/gclient_eval.py", line 146, in _gclient_eval
return _convert(node_or_string)
File "/home/jgd/dev/depot_tools/gclient_eval.py", line 145, in _convert
getattr(node, 'lineno', '<unknown>')))
ValueError: unexpected AST node: <_ast.Num object at 0x1cf5d10> Num(n=1) (file '/home/jgd/dev/jgd/webrtc/src/chromium/src/buildtools/DEPS', line 1)
Error: Command '/usr/bin/python -u src/sync_chromium.py --target-revision 316b880c55452eb694a27ba4d1aa9e74ec9ef342' returned non-zero exit status 1 in /home/jgd/dev/jgd/webrtc
Both are fresh installed and I have no idea about what is happening, it is the first time that this occurs to me. Know anyone how to solve it?
EDIT: The DEPS file that appears in error trace is the following:
recursion = 1
use_relative_paths = True
vars = {
"git_url": "https://chromium.googlesource.com",
"clang_format_rev": "0ed791d1387a3c9146ea6c453c646f3c0fc97784", # r282136
"libcxx_revision": "b1ece9c037d879843b0b0f5a2802e1e9d443b75a", # r256621
"libcxxabi_revision": "0edb61e2e581758fc4cd4cd09fc588b3fc91a653", # r256323
}
deps = {
"clang_format/script":
Var("git_url") + "/chromium/llvm-project/cfe/tools/clang-format.git#" +
Var("clang_format_rev"),
"third_party/libc++/trunk":
Var("git_url") + "/chromium/llvm-project/libcxx.git" + "#" +
Var("libcxx_revision"),
"third_party/libc++abi/trunk":
Var("git_url") + "/chromium/llvm-project/libcxxabi.git" + "#" +
Var("libcxxabi_revision"),
}
AFAIK this is auto-generated.
sync_chromium.py was removed back in December, replaced by a more efficient and far smaller download package. I suggest you follow the instructions at https://webrtc.org/native-code/development and get a newer checkout. It should be less likely to have download problems.
The issue here is the version of Python used. As you can see in command error prompt, the version that I have used is not 2.7+ as recomended in chromium website. Doing the change from Python to Python2.7 solve the issue.

Buildout error on custom mfabrik gomobiletheme

If i create a new theme, i become a Traceback:
../bin/paster create -t gomobile_theme gomobiletheme.mytheme
...
Traceback (most recent call last):
File "../bin/paster", line 275, in <module>
paste.script.command.run()
File "/opt/plone4/plone4/eggs/PasteScript-1.7.5-py2.6.egg/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/opt/plone4/plone4/eggs/PasteScript-1.7.5-py2.6.egg/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/opt/plone4/plone4/eggs/PasteScript-1.7.5-py2.6.egg/paste/script/command.py", line 238, in run
result = self.command()
File "/opt/plone4/plone4/eggs/PasteScript-1.7.5-py2.6.egg/paste/script/create_distro.py", line 170, in command
egg_info_dir = pluginlib.egg_info_dir(output_dir, dist_name)
File "/opt/plone4/plone4/eggs/PasteScript-1.7.5-py2.6.egg/paste/script/pluginlib.py", line 135, in egg_info_dir
% ', '.join(all))
IOError: No egg-info directory found (looked in ./gomobiletheme.mytheme/./gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/setup.cfg/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/docs/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/README.txt/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/gomobiletheme/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/src/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/setup.py/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/CONTRIBUTORS.txt/gomobiletheme.mytheme.egg-info, ./gomobiletheme.mytheme/CHANGES.txt/gomobiletheme.mytheme.egg-info)
Then I added my theme to buildout.cfg, reran it become a error like this:
bin/buildout
Develop: '/opt/plone4/plone4/src/gomobiletheme.mytheme'
error in gomobiletheme.mytheme setup command: Distribution
contains no modules or packages for namespace package 'gomobiletheme'
While:
Installing.
Processing develop directory '/opt/plone4/plone4/src/
gomobiletheme.mytheme'.
An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/opt/plone4/plone4/eggs/zc.buildout-1.4.3-py2.6.egg/zc/
buildout/buildout.py", line 1660, in main
getattr(buildout, command)(args)
File "/opt/plone4/plone4/eggs/zc.buildout-1.4.3-py2.6.egg/zc/
buildout/buildout.py", line 394, in install
installed_develop_eggs = self._develop()
File "/opt/plone4/plone4/eggs/zc.buildout-1.4.3-py2.6.egg/zc/
buildout/buildout.py", line 634, in _develop
zc.buildout.easy_install.develop(setup, dest)
File "/opt/plone4/plone4/eggs/zc.buildout-1.4.3-py2.6.egg/zc/
buildout/easy_install.py", line 895, in develop
*args) == 0
AssertionError
Know anyone whats wrong?
I think this is caused by the template you are using. Perhaps it is outdated.
Check if your setup.py looks like this:
packages=find_packages('src'),
namespace_packages=['gomobiletheme'],
But you need an additional:
package_dir = {'': 'src'},
directive to get the buildout working again.

Categories

Resources