how should I import aws-sdk? - aws-sdk

I tried to import aws-sdk/client-personalize-import but it didnt work.
it showed error described below.
Should i import another modules or something?
or anybody has idea if it is built on vue.js?
ERROR Failed to compile with 15 errors friendly-errors 15:24:07
ERROR in ./node_modules/#aws-sdk/client-personalize-runtime/node_modules/#aws-sdk/config-resolver/dist-es/index.js friendly-errors 15:24:07
Module build failed: Error: ENOENT: no such file or directory, open 'C:\Users\sara.yamashita\project\ec-front\node_modules\#aws-sdk\client-personalize-runtime\node_modules\#aws-sdk\config-resolver\dist-es\index.js'
friendly-errors 15:24:07
# ./node_modules/#aws-sdk/client-personalize-runtime/dist-es/PersonalizeRuntimeClient.js 1:0-63 17:26-45
# ./node_modules/#aws-sdk/client-personalize-runtime/dist-es/index.js
# ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/string-replace-loader??ref--12!./pages/item/_code/index.vue?vue&type=script&lang=js&
# ./pages/item/_code/index.vue?vue&type=script&lang=js&
# ./pages/item/_code/index.vue
# ./.nuxt/router.js
# ./.nuxt/index.js
# ./.nuxt/client.js
# multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js
friendly-errors 15:24:07
ERROR in ./node_modules/#aws-sdk/client-personalize-runtime/node_modules/#aws-sdk/middleware-content-length/dist-es/index.js friendly-errors 15:24:07
Module build failed: Error: ENOENT: no such file or directory, open 'C:\Users\sara.yamashita\project\ec-front\node_modules\#aws-sdk\client-personalize-runtime\node_modules\#aws-sdk\middleware-content-length\dist-es\index.js'
friendly-errors 15:24:07
# ./node_modules/#aws-sdk/client-personalize-runtime/dist-es/PersonalizeRuntimeClient.js 2:0-76 26:33-55
# ./node_modules/#aws-sdk/client-personalize-runtime/dist-es/index.js
# ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/string-replace-loader??ref--12!./pages/item/_code/index.vue?vue&type=script&lang=js&
# ./pages/item/_code/index.vue?vue&type=script&lang=js&
# ./pages/item/_code/index.vue
# ./.nuxt/router.js
# ./.nuxt/index.js
# ./.nuxt/client.js
# multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js
friendly-errors 15:24:07

Related

COLMAP running error in remote server while running Non-Rigid NeRF

I was checking the github code of LLFF : https://github.com/Fyusion/LLFF, Non-Rigid NeRF : https://github.com/facebookresearch/nonrigid_nerf and followed the suggested steps to install requirements. While running a preprocess file which return poses from images by SfM using COLMAP. I was getting the following error while executing the preprocessing in a remote server. Can anyone please help me with solving this?
python preprocess.py --input data/example_sequence1/
Need to run COLMAP
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, webgl, xcb.
*** Aborted at 1660905461 (unix time) try "date -d #1660905461" if you are using GNU date ***
PC: # 0x0 (unknown)
*** SIGABRT (#0x3e900138a9f) received by PID 1280671 (TID 0x7f5740d49000) from PID 1280671; stack trace: ***
# 0x7f57463a2197 google::(anonymous namespace)::FailureSignalHandler()
# 0x7f574421f420 (unknown)
# 0x7f5743bf300b gsignal
# 0x7f5743bd2859 abort
# 0x7f57442be35b QMessageLogger::fatal()
# 0x7f574477c799 QGuiApplicationPrivate::createPlatformIntegration()
# 0x7f574477cb6f QGuiApplicationPrivate::createEventDispatcher()
# 0x7f57443dbb62 QCoreApplicationPrivate::init()
# 0x7f574477d1e1 QGuiApplicationPrivate::init()
# 0x7f5744c03bc5 QApplicationPrivate::init()
# 0x562bbb634975 colmap::RunFeatureExtractor()
# 0x562bbb61d1a0 main
# 0x7f5743bd4083 __libc_start_main
# 0x562bbb620e39 (unknown)
Traceback (most recent call last):
File "imgs2poses.py", line 18, in <module>
gen_poses(args.scenedir, args.match_type)
File "/data1/user_data/ashish/NeRF/LLFF/llff/poses/pose_utils.py", line 268, in gen_poses
run_colmap(basedir, match_type)
File "/data1/user_data/ashish/NeRF/LLFF/llff/poses/colmap_wrapper.py", line 35, in run_colmap
feat_output = ( subprocess.check_output(feature_extractor_args, universal_newlines=True) )
File "/home/ashish/anaconda3/envs/nrnerf/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/home/ashish/anaconda3/envs/nrnerf/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['colmap', 'feature_extractor', '--database_path', 'scenedir/database.db', '--image_path', 'scenedir/images', '--ImageReader.single_camera', '1']' died with <Signals.SIGABRT: 6>.
'''

Why is celery not working on Elastic Beans stalk?

I have an application that runs well with celery on local but when I deploy it into elastic beanstalk, celery seems to shutdown or not run my task. I am using supervisor to run celery.
This is my configuration for supervisord
I also set a global env of C_FORCE_ROOT=true
Error: 2020-12-21 04:49:56,076 INFO waiting for app, celery-worker to die [2020-12-21 04:49:57,732: DEBUG/MainProcess] removing tasks from inqueue until task handler finished
Unrecoverable error: WorkerLostError('Could not start worker processes')
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/celery/worker/worker.py", line 208, in start
self.blueprint.start(self)
File "/usr/local/lib/python3.8/site-packages/celery/bootsteps.py", line 119, in start
step.start(parent)
File "/usr/local/lib/python3.8/site-packages/celery/bootsteps.py", line 369, in start
return self.obj.start()
File "/usr/local/lib/python3.8/site-packages/celery/worker/consumer/consumer.py", line 318, in start
blueprint.start(self)
File "/usr/local/lib/python3.8/site-packages/celery/bootsteps.py", line 119, in start
step.start(parent)
File "/usr/local/lib/python3.8/site-packages/celery/worker/consumer/consumer.py", line 599, in start
c.loop(*c.loop_args())
File "/usr/local/lib/python3.8/site-packages/celery/worker/loops.py", line 59, in asynloop
raise WorkerLostError('Could not start worker processes')
billiard.exceptions.WorkerLostError: Could not start worker processes
[supervisord]
nodaemon=true
[program:app]
command = gunicorn -b 0.0.0.0:5000 --worker-class gevent application.app:app
user=root
directory = /usr/src/app/restful
priority = 900
autostart=true
autorestart = true
stopsignal = TERM
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
stdin_open = true
tty=true
[program:celery-worker]
command= python -m celery worker -A application.libs.celery_config.celery --loglevel=DEBUG --uid=nobody --gid=nogroup
user=root
directory = /usr/src/app/restful
autostart=true
autorestart = false
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
stdin_open = true
tty=true
[program:celery-beat]
command= python -m celery beat -A application.libs.celery_config.celery --schedule=/tmp/celerybeat-schedule --loglevel=DEBUG
user=root
directory = /usr/src/app/restful
autostart=true
autorestart = false
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
stdin_open = true
tty=true

3D caffe make runtest error

make 3D-caffe, make all and make test is fine. But make runtest is wrong here
it looks like a relation with GPU setting, but I am not sure
[----------] 4 tests from SoftmaxWithLossLayerTest/3, where TypeParam
= caffe::GPUDevice<double> [ RUN ] SoftmaxWithLossLayerTest/3.TestGradient
*** Aborted at 1493416676 (unix time) try "date -d #1493416676" if you are using GNU date *** PC: # 0x7f4ddfd59a05 caffe::Blob<>::gpu_data()
*** SIGSEGV (#0x17ec) received by PID 15580 (TID 0x7f4de5f8fac0) from PID 6124; stack trace: ***
# 0x7f4ddf3a1390 (unknown)
# 0x7f4ddfd59a05 caffe::Blob<>::gpu_data()
# 0x7f4ddfd93ad0 caffe::SoftmaxWithLossLayer<>::Forward_gpu()
# 0x45ba59 caffe::Layer<>::Forward()
# 0x4844a0 caffe::GradientChecker<>::CheckGradientSingle()
# 0x487603 caffe::GradientChecker<>::CheckGradientExhaustive()
# 0x5d44c7 caffe::SoftmaxWithLossLayerTest_TestGradient_Test<>::TestBody()
# 0x8ac7d3 testing::internal::HandleExceptionsInMethodIfSupported<>()
# 0x8a5dea testing::Test::Run()
# 0x8a5f38 testing::TestInfo::Run()
# 0x8a6015 testing::TestCase::Run()
# 0x8a72ef testing::internal::UnitTestImpl::RunAllTests()
# 0x8a7613 testing::UnitTest::Run()
# 0x4512a9 main
# 0x7f4ddefe7830 __libc_start_main
# 0x4577c9 _start
# 0x0 (unknown) Makefile:468: recipe for target 'runtest' failed make: *** [runtest] Segmentation fault (core dumped)
I would love to help you, but your message is unclear. I would suggest checking your grammar and word choice next time.

Sidekiq server is not processing scheduled jobs when started using systemd

I have a cuba application which I want to use sidekiq with.
This is how I setup the config.ru:
require './app'
require 'sidekiq'
require 'sidekiq/web'
environment = ENV['RACK_ENV'] || "development"
config_vars = YAML.load_file("./config.yml")[environment]
Sidekiq.configure_client do |config|
config.redis = { :url => config_vars["redis_uri"] }
end
Sidekiq.configure_server do |config|
config.redis = { url: config_vars["redis_uri"] }
config.average_scheduled_poll_interval = 5
end
# run Cuba
run Rack::URLMap.new('/' => Cuba, '/sidekiq' => Sidekiq::Web)
I started sidekiq using systemd. This is the systemd script which I adapted from the sidekiq.service on the sidekiq site.:
#
# systemd unit file for CentOS 7, Ubuntu 15.04
#
# Customize this file based on your bundler location, app directory, etc.
# Put this in /usr/lib/systemd/system (CentOS) or /lib/systemd/system (Ubuntu).
# Run:
# - systemctl enable sidekiq
# - systemctl {start,stop,restart} sidekiq
#
# This file corresponds to a single Sidekiq process. Add multiple copies
# to run multiple processes (sidekiq-1, sidekiq-2, etc).
#
# See Inspeqtor's Systemd wiki page for more detail about Systemd:
# https://github.com/mperham/inspeqtor/wiki/Systemd
#
[Unit]
Description=sidekiq
# start us only once the network and logging subsystems are available,
# consider adding redis-server.service if Redis is local and systemd-managed.
After=syslog.target network.target
# See these pages for lots of options:
# http://0pointer.de/public/systemd-man/systemd.service.html
# http://0pointer.de/public/systemd-man/systemd.exec.html
[Service]
Type=simple
Environment=RACK_ENV=development
WorkingDirectory=/media/temp/bandmanage/repos/fall_prediction_verification
# If you use rbenv:
#ExecStart=/bin/bash -lc 'pwd && bundle exec sidekiq -e production'
ExecStart=/home/froy001/.rvm/wrappers/fall_prediction/bundle exec "sidekiq -r app.rb -L log/sidekiq.log -e development"
# If you use the system's ruby:
#ExecStart=/usr/local/bin/bundle exec sidekiq -e production
User=root
Group=root
UMask=0002
# if we crash, restart
RestartSec=1
Restart=on-failure
# output goes to /var/log/syslog
StandardOutput=syslog
StandardError=syslog
# This will default to "bundler" if we don't specify it
SyslogIdentifier=sidekiq
[Install]
WantedBy=multi-user.target
The code calling the worker is :
raw_msg = JSON.parse(req.body.read, {:symbolize_names => true})
if raw_msg
ts = raw_msg[:ts]
waiting_period = (1000*60*3) # wait 3 min before checking
perform_at_time = Time.at((ts + waiting_period)/1000).utc
FallVerificationWorker.perform_at((0.5).minute.from_now, raw_msg)
my_res = { result: "success", status: 200}.to_json
res.status = 200
res.write my_res
else
my_res = { result: "not found", status: 404}.to_json
res.status = 404
res.write my_res
end
I am only using the default q.
My problem is that the job is not being processed at all.
After you run systemctl enable sidekiq so that it starts at boot and systemctl start sidekiq so that it starts immediately, then you should have some logs to review which will provide some detail about any failure to start:
sudo journalctl -u sidekiq
Review the logs, review the systemd docs and adjust your unit file as needed. You can find all the installed systemd documentation with apropos systemd. Some of the most useful man pages to review are systemd.service,systemd.exec and systemd.unit

this.isRTL is not a function error when using paper-dropdown-menu webcomponent

Getting this error when loading up the paper-dropdown-menu webcomponent.
Uncaught TypeError: this._isRTL is not a function
Longer stacktrace for SEO:
Uncaught TypeError: this._isRTL is not a
function get _localeHorizontalAlign #
iron-dropdown.html:306_updateOverlayPosition #
iron-dropdown.html:461_positionTargetChanged #
iron-dropdown.html:405_observerEffect #
polymer.html:1562_effectEffects # polymer.html:1405_propertySetter #
polymer.html:1389setter # polymer.html:1468attached #
iron-fit-behavior.html:222_invokeBehavior #
polymer-micro.html:433_doBehavior # polymer-micro.html:426(anonymous
function) # polymer-micro.html:210_makeReady #
polymer-micro.html:111(anonymous function) # polymer-micro.html:117
polymer-mini.html:2046 Uncaught TypeError: Cannot read property
'getWidth' of undefined(anonymous function) #
app-drawer-layout.html:189complete #
polymer-mini.html:2085Debouncer.boundComplete #
polymer-mini.html:2062_atEndOfMicrotask #
polymer-mini.html:2040window.MutationObserver.observe.characterData #
polymer-mini.html:2055
Apparently Polymer 1.5 is not compatible with paper-dropdown-menu version ~1.2.1. I had to downgrade to Polymer 1.4 to use the paper-dropdown-menu.
Edit:
The problem was the this component is not compatible with the Shadow DOM.