in ubuntu, I try to ninja -C out/Release_arm system_webview_apk , error happened - chromium

in ubuntu, I try to ninja -C out/Release_arm system_webview_apk , error happened
ACTION //v8:generate_bytecode_builtins_list(//build/toolchain/android:android_clang_arm)
FAILED: gen/v8/builtins-generated/bytecodes-builtins-list.h
python3 ../../v8/tools/run.py ./clang_x86_v8_arm/bytecode_builtins_list_generator gen/v8/builtins-generated/bytecodes-builtins-list.h
Traceback (most recent call last):
File "/mnt/d/code/chromium/src/out/Release_arm/../../v8/tools/run.py", line 12, in
result = subprocess.call(sys.argv[1:])
File "/usr/lib/python3.9/subprocess.py", line 349, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.9/subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: './clang_x86_v8_arm/bytecode_builtins_list_generator'

Related

Error with fetching chromium with fetch command

When I try to fetch chromium with the command it gives me a whole bunch of errors and at the end says "FileNotFoundError: [WinError 2] The system cannot find the file specified"
After the error occurred (output bellow) I tried to add the DEPOT_TOOLS_WIN_TOOLCHAIN to the system environment variables but after a restart nothing happened. Does anyone have a solution to this?
Error Output:
[0:00:00] Started.
Traceback (most recent call last):
File "C:\src\depot_tools\metrics.py", line 301, in print_notice_and_exit
yield
File "C:\src\depot_tools\gclient.py", line 3495, in <module>
sys.exit(main(sys.argv[1:]))
File "C:\src\depot_tools\gclient.py", line 3481, in main
return dispatcher.execute(OptionParser(), argv)
File "C:\src\depot_tools\subcommand.py", line 252, in execute
return command(parser, args[1:])
File "C:\src\depot_tools\gclient.py", line 3032, in CMDsync
ret = client.RunOnDeps('update', args)
File "C:\src\depot_tools\gclient.py", line 2026, in RunOnDeps
work_queue.flush(revision_overrides,
File "C:\src\depot_tools\gclient_utils.py", line 1016, in flush
reraise(e[0], e[1], e[2])
File "C:\src\depot_tools\gclient_utils.py", line 70, in reraise
raise value
File "C:\src\depot_tools\gclient_utils.py", line 1093, in run
self.item.run(*self.args, **self.kwargs)
File "C:\src\depot_tools\gclient.py", line 1005, in run
self._got_revision = self._used_scm.RunCommand(command, options, args,
File "C:\src\depot_tools\gclient_scm.py", line 128, in RunCommand
return getattr(self, command)(options, args, file_list)
File "C:\src\depot_tools\gclient_scm.py", line 610, in update
mirror = self._GetMirror(url, options, revision, revision_ref)
File "C:\src\depot_tools\gclient_scm.py", line 1060, in _GetMirror
if not self.cache_dir:
File "C:\src\depot_tools\gclient_scm.py", line 225, in cache_dir
return git_cache.Mirror.GetCachePath()
File "C:\src\depot_tools\git_cache.py", line 193, in GetCachePath
cachepath = subprocess.check_output(
File "C:\src\depot_tools\.cipd_bin\3.8\bin\Lib\subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\src\depot_tools\.cipd_bin\3.8\bin\Lib\subprocess.py", line 493, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\src\depot_tools\.cipd_bin\3.8\bin\Lib\subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\src\depot_tools\.cipd_bin\3.8\bin\Lib\subprocess.py", line 1311, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
Subprocess failed with return code 1.
You should delete config DEPOT_TOOLS_UPDATE on environment.

Protobuf errors while using Tensorflow Object Detection API locally

I got tensorflow and object detection API on my machine.
Test run shows that everything works.
~ $ cd models/research
research $ protoc object_detection/protos/*.proto --python_out=.
research $ export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
research $ python3 object_detection/builders/model_builder_test.py
...............
----------------------------------------------------------------------
Ran 15 tests in 0.144s
OK
Then I tried to retrain a model and got the protobuf error
research $ cd object_detection
object_detection $ python3 train.py --logtostderr --train_dir=training/ --pipeline_config_path=ssdlite_mobilenet_v2_coco_2018_05_09/pipeline.config
WARNING:tensorflow:From /Users/me/models/research/object_detection/trainer.py:257: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Please switch to tf.train.create_global_step
Traceback (most recent call last):
File "/Users/me/models/research/object_detection/utils/label_map_util.py", line 135, in load_labelmap
text_format.Merge(label_map_string, label_map)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/protobuf/text_format.py", line 533, in Merge
descriptor_pool=descriptor_pool)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/protobuf/text_format.py", line 587, in MergeLines
return parser.MergeLines(lines, message)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/protobuf/text_format.py", line 620, in MergeLines
self._ParseOrMerge(lines, message)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/protobuf/text_format.py", line 635, in _ParseOrMerge
self._MergeField(tokenizer, message)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/protobuf/text_format.py", line 735, in _MergeField
merger(tokenizer, message, field)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/protobuf/text_format.py", line 823, in _MergeMessageField
self._MergeField(tokenizer, sub_message)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/protobuf/text_format.py", line 722, in _MergeField
tokenizer.Consume(':')
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/protobuf/text_format.py", line 1087, in Consume
raise self.ParseError('Expected "%s".' % token)
google.protobuf.text_format.ParseError: 3:10 : Expected ":".
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/protobuf/internal/python_message.py", line 1083, in MergeFromString
if self._InternalParse(serialized, 0, length) != length:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/protobuf/internal/python_message.py", line 1105, in InternalParse
(tag_bytes, new_pos) = local_ReadTag(buffer, pos)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/protobuf/internal/decoder.py", line 181, in ReadTag
while six.indexbytes(buffer, pos) & 0x80:
TypeError: unsupported operand type(s) for &: 'str' and 'int'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 184, in <module>
tf.app.run()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "train.py", line 180, in main
graph_hook_fn=graph_rewriter_fn)
File "/Users/me/models/research/object_detection/trainer.py", line 264, in train
train_config.prefetch_queue_capacity, data_augmentation_options)
File "/Users/me/models/research/object_detection/trainer.py", line 59, in create_input_queue
tensor_dict = create_tensor_dict_fn()
File "train.py", line 121, in get_next
dataset_builder.build(config)).get_next()
File "/Users/me/models/research/object_detection/builders/dataset_builder.py", line 155, in build
label_map_proto_file=label_map_proto_file)
File "/Users/me/models/research/object_detection/data_decoders/tf_example_decoder.py", line 245, in __init__
use_display_name)
File "/Users/me/models/research/object_detection/utils/label_map_util.py", line 152, in get_label_map_dict
label_map = load_labelmap(label_map_path)
File "/Users/me/models/research/object_detection/utils/label_map_util.py", line 137, in load_labelmap
label_map.ParseFromString(label_map_string)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/protobuf/message.py", line 185, in ParseFromString
self.MergeFromString(serialized)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/google/protobuf/internal/python_message.py", line 1089, in MergeFromString
raise message_mod.DecodeError('Truncated message.')
google.protobuf.message.DecodeError: Truncated message.
object_detection $
I tried a bunch of similar problems' solutions, but they didn't work for my case. For example this one suggest to encode pbtxt file with ASCII.
Python 2 gives an error too. Here is it's last line
google.protobuf.message.DecodeError: Unexpected end-group tag.
Context:
macOS 10.13.4
Local run on CPU
Python 3.6.4
protobuf 3.5.1
libprotoc 3.4.0
tensorflow 1.8.0
Google Cloud SDK 200.0.0
bq 2.0.33
core 2018.04.30
gsutil 4.31

Tensorflow TF_records Generate Error

When I try to generate TF record, I'm getting the following error message:
Traceback (most recent call last):
File "generate_tfrecord.py", line 112, in <module>
tf.app.run()
File "/home/harisohmnaathss/anaconda3/envs/tensorflow/lib/python3.5/site-
packages/tensorflow/python/platform/app.
py", line 124, in run
_sys.exit(main(argv))
File "generate_tfrecord.py", line 98, in main
writer = tf.python_io.TFRecordWriter(FLAGS.output_path)
File "/home/harisohmnaathss/anaconda3/envs/tensorflow/lib/python3.5/site-
packages/tensorflow/python/lib/io/tf_rec
ord.py", line 106, in __init__
compat.as_bytes(path), compat.as_bytes(compression_type), status)
File "/home/harisohmnaathss/anaconda3/envs/tensorflow/lib/python3.5/site-
packages/tensorflow/python/framework/err
ors_impl.py", line 473, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: ; No such file or
directory
The command that I try to run is:
python generate_tfrecord.py --csv_input=data/Train_labels.csv
--output_path=data/train.records
Any ideas to solve this issue?
You are supplying output path as data/train.records instead of data/train.tfrecord

fetch chromium - No such file or directory

I've cloned depot tools given instructions from here on ubuntu 17.04.
When I run fetch chromium I get the following error.
./fetch chromium
Running: gclient root
Traceback (most recent call last):
File "./fetch.py", line 299, in <module>
sys.exit(main())
File "./fetch.py", line 294, in main
return run(options, spec, root)
File "./fetch.py", line 280, in run
if not options.force and checkout.exists():
File "./fetch.py", line 82, in exists
gclient_root = self.run_gclient('root').strip()
File "./fetch.py", line 78, in run_gclient
return self.run(cmd_prefix + cmd, **kwargs)
File "./fetch.py", line 68, in run
return subprocess.check_output(cmd, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 212, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I have come across similar errors in stackoverflow while searching for a resolution however none of them helped resolve the problem.
I'm not clear on if there is any steps required after cloning to install depot tools? The readme
Any thoughts on what is required to solve the problem?
Conteh

when using selenium with phantomJS, I got a WinError 87.

I have selenium 3.6.0 and phantomjs-2.1.1-windows in my Windows 10,and set the PATH to the phantomJS.exe. When I use the code below:
driver = webdriver.PhantomJS(executable_path='')
I got the fault:
Traceback (most recent call last):
File "D:\Python 3.5.4\test\BeautifulSoup.py", line 10, in <module>
driver = webdriver.PhantomJS(executable_path='')
File "C:\Program Files\Python35\lib\site-
packages\selenium\webdriver\phantomjs\webdriver.py", line 52, in __init__
self.service.start()
File "C:\Program Files\Python35\lib\site-
packages\selenium\webdriver\common\service.py", line 74, in start
stdout=self.log_file, stderr=self.log_file)
File "C:\Program Files\Python35\lib\subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "C:\Program Files\Python35\lib\subprocess.py", line 957, in
_execute_child
startupinfo)
OSError: [WinError 87] wrong parameters。
Sorry for disturbing. Actually when I set the phantomJS.exe to the $PATH. I actually do not need any argument in the webdriver.PhantomJS(). I found the doc below:
executable_path - path to the executable. If the default is used it assumes the executable is in the $PATH