AR.js glb animation don't play - ar.js

The glb model is well displayed but the animation is not playing in image tracking.
<a-nft
type="nft"
url="https://raw.githubusercontent.com/YvesBB/soleil/main/soleil3"
smooth="true"
smoothCount="10"
smoothTolerance=".01"
smoothThreshold="5"
>
<a-entity
animation-mixer
id "man" gltf-model="https://raw.githubusercontent.com/YvesBB/models/main/bernard2.glb"
rotation= "90 0 180"
scale="4 4 4"
position="200 -250 -200">
</a-entity>
</a-nft>
<a-entity camera></a-entity>
</a-scene>
</body>

Related

GCP Vertex AI Training Custom Job with BigQuery: The requested URL was not found on this server

I am following this Google CoLab tutorial and error on Step 5, custom model training job using a scikit-learn prebuilt container.
The training code works locally with the same environment as the container. But when I submit a training job, I get the following error:
The replica workerpool0-0 exited with a non-zero status of 1.
Traceback (most recent call last):
[...]
google.api_core.exceptions.NotFound: 404 POST https://bigquery.googleapis.com/bigquery/v2/projects//my-project/jobs?prettyPrint=false: <!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}#media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}#media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}#media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>404.</b> <ins>That’s an error.</ins>
<p>The requested URL <code>/bigquery/v2/projects//my-project/jobs?prettyPrint=false</code> was not found on this server. <ins>That’s all we know.</ins>
(job ID: my-job-id)
-----Query Job SQL Follows-----
| . | . | . |
1:
2: SELECT * from titanic.survivors"
3:
| . | . | . |
It seems like a problem with google-api-core but I am confused as to why this fails in the cloud when it runs locally with the same dependencies.
The error https://bigquery.googleapis.com/bigquery/v2/projects//my-project/jobs?prettyPrint=false also does not look right because of the projects//my-project but the training job submits that request.

Cannot Deploy New ML Model Version to Google AI-Platform with custom prediction routine in Scikit-learn

I am trying to create a custom prediction routine on GCP AI-Platform using scikit-learn by following along the AI Platform tutorial.
When I get to the end Deploy your custom prediction routine, I create the model on the global endpoint as stated
gcloud ai-platform models create $MODEL_NAME \
--regions us-central1
However, I cannot use gcloud beta ai-platform versions create to create a model version. When I follow the next step:
gcloud components install beta
gcloud beta ai-platform versions create $VERSION_NAME \
--model $MODEL_NAME \
--runtime-version 2.1 \
--python-version 3.7 \
--origin gs://$BUCKET_NAME/custom_prediction_routine_tutorial/model/ \
--package-uris gs://$BUCKET_NAME/custom_prediction_routine_tutorial/my_custom_code-0.1.tar.gz \
--prediction-class predictor.MyPredictor
I get the following cryptic error (presumably meaning it cant find the model resource):
Using endpoint [https://us-central-ml.googleapis.com/]
ERROR: (gcloud.beta.ai-platform.versions.create) HTTPError 404: <!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}#media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}#media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}#media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>404.</b> <ins>That’s an error.</ins>
<p>The requested URL <code>/v1/projects/test-project/models/IrisPredictor/versions</code> was not found on this server. <ins>That’s all we know.</ins>
Note that I have changed the python version from 3.5 -> 3.7 and runtime version from 1.13 -> 2.1 from the tutorial since that does work when I go to the gcp console in the browser and create a new version manually and using python 3.5 is not an option for me.
You should add the --region global flag to the command.
Also keep in mind that you can only deploy a custom prediction routine when you use a legacy (MLS1) machine type for your model version.
To specify the machine-type, you can pick between mls1-c1-m2 and mls1-c4-m2. For more information about the machine types read this doc

Cloud-sql-proxy go binary returns 404

I am trying to run cloud_sql_proxy installed as a binary from go get, but I always get a 404 Error.
I have followed the instructions at https://github.com/GoogleCloudPlatform/cloudsql-proxy, but with no luck.
$GOPATH/go/bin/cloud_sql_proxy -instances=project_name:region:instance_name=tcp:3306 -credential_file=/path/to/cloud-sql-proxy.json
The error I get:
2020/01/18 13:20:03 Rlimits for file descriptors set to {&{8500 9223372036854775807}}
2020/01/18 13:20:03 using credential file for authentication; email=<EMAIL>
2020/01/18 13:20:03 errors parsing config:
googleapi: got HTTP response code 404 with body: <!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}#media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}#media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}#media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>404.</b> <ins>That’s an error.</ins>
<p>The requested URL <code>/sql/v1beta4/sql/v1beta4/projects/project_name/instances/instance_name?alt=json&prettyPrint=false</code> was not found on this server. <ins>That’s all we know.</ins>
However, if I get the binary from https://cloud.google.com/sql/docs/mysql/sql-proxy, then the connection if fine, proving that the instance address and the credential file work just fine. The service account has also the Cloud SQL Admin role, so that should be just fine as well.
I have cloned the repo, and tried to debug the code to see where exactly if fails, and of course, it fails at:
cmd/cloud_sql_proxy/proxy.go:268
sql.BasePath = *host
inst, err := sql.Instances.Get(proj, name).Do()
if err != nil {
return instanceConfig{}, err
}
The reason I am insisting on using the go-binary is that I want to re-use cloud_sql_proxy on Raspberry PI 3b+, and this seems to be the only option of getting cloud_sql_proxy working on ARM architecture.

When loading a table to bigquery, google.auth.exceptions.RefreshError is raised everytime

I was loading a json lines file to bigquery. However, it failed because of this error :
File "/home/togayyazar/.local/lib/python3.7/site-packages/google/auth/compute_engine/credentials.py", line 102, in refresh
six.raise_from(new_exc, caught_exc)
File "<string>", line 3, in raise_from
google.auth.exceptions.RefreshError: ('Failed to retrieve http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/?recursive=true from the Google Compute Enginemetadata service. Status: 404 Response:\nb\'<!DOCTYPE html>\\n<html lang=en>\\n <meta charset=utf-8>\\n <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">\\n <title>Error 404 (Not Found)!!1</title>\\n <style>\\n *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}#media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}#media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}#media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}\\n </style>\\n <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\\n <p><b>404.</b> <ins>That\\xe2\\x80\\x99s an error.</ins>\\n <p>The requested URL <code>/computeMetadata/v1/instance/service-accounts/default/?recursive=true</code> was not found on this server. <ins>That\\xe2\\x80\\x99s all we know.</ins
I've changed credential json file with a new one but it did not work.
There is an issue with your credentials. It could be related to the authentication method you are using (service-account, user credentials), and how you are using it (from a BigQuery client library, command line tool).
It seems to me that you are using the bq command line tool (part of the google-cloud-sdk) from a Google Compute Engine VM. By default, you have access to a service-account within the instance, if you want to authenticate with another method, here are the instructions.
Looks like you might have a typo in your filename/path.
HTTP Error 404 is a NotFound error, meaning it couldn't find something.
Judging by the error in the html it couldn't find "/computeMetadata/v1/instance/service-accounts/default/?recursive=true" at the location where you are executing your command, rather than the credentials not having permissions.

Github activity feed urls dont include domain

I want to display a user's activity feed in an rails application. I am using feedjira.
2.2.4 :006 > xml_feed = Feedjira::Feed.fetch_raw "https://github.com/prasadsurase.atom"
2.2.4 :006 > github_feed = Feedjira::Feed.parse xml_feed
2.2.4 :006 > github_feed.entries.first.content
=> "<!-- pull_request -->\n<svg aria-label=\"Pull request\" class=\"octicon octicon-git-pull-request dashboard-event-icon\" height=\"32\" role=\"img\" version=\"1.1\" viewBox=\"0 0 12 16\" width=\"24\"><path d=\"M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z\"></path></svg>\n\n<div class=\"time\">\n <relative-time datetime=\"2016-09-23T07:30:24Z\">Sep 23, 2016</relative-time>\n</div>\n\n<div class=\"title\">\n prasadsurase opened pull request joshsoftware/code-curiosity#136\n</div>\n\n<div class=\"details\">\n <img alt=\"#prasadsurase\" class=\"gravatar\" height=\"30\" src=\"https://avatars3.githubusercontent.com/u/562052?v=3&s=60\" width=\"30\" />\n <div class=\"message\">\n <blockquote>Fixed controller method scopes. Removed unwanted routes.</blockquote>\n <div class=\"pull-info\">\n <svg aria-hidden=\"true\" class=\"octicon octicon-git-commit\" height=\"16\" version=\"1.1\" viewBox=\"0 0 14 16\" width=\"14\"><path d=\"M10.86 7c-.45-1.72-2-3-3.86-3-1.86 0-3.41 1.28-3.86 3H0v2h3.14c.45 1.72 2 3 3.86 3 1.86 0 3.41-1.28 3.86-3H14V7h-3.14zM7 10.2c-1.22 0-2.2-.98-2.2-2.2 0-1.22.98-2.2 2.2-2.2 1.22 0 2.2.98 2.2 2.2 0 1.22-.98 2.2-2.2 2.2z\"></path></svg>\n <em>1</em> commit with\n <em>34</em> additions and\n <em>31</em> deletions\n </div>\n </div>\n</div>\n"
when rendering the content for every entry from github_feed.entries in haml as raw, the links do not contain the domain https://github.com/ but contain only the path. This causes problem as such that the rendered links on the UI contain the app domain and not github. How do we fix this?
Since github atom feeds provides the content with relative url's you might want to replace them with absolute references.
This could be done with
gsub( %r{<a href=\"/},'<a href="https://github.com/')
And thus replace your:
2.2.4 :006 > github_feed.entries.first.content
with
2.2.4 :006 > github_feed.entries.first.content.gsub( %r{<a href=\"/},'<a href="https://github.com/')
=> "<!-- pull_request_review_comment -->\n<svg aria-label=\"Review pull request comment\" class=\"octicon octicon-comment-discussion dashboard-event-icon\" height=\"32\" role=\"img\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"32\"><path d=\"M15 1H6c-.55 0-1 .45-1 1v2H1c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h1v3l3-3h4c.55 0 1-.45 1-1V9h1l3 3V9h1c.55 0 1-.45 1-1V2c0-.55-.45-1-1-1zM9 11H4.5L3 12.5V11H1V5h4v3c0 .55.45 1 1 1h3v2zm6-3h-2v1.5L11.5 8H6V2h9v6z\"></path></svg>\n\n<div class=\"time\">\n <relative-time datetime=\"2016-09-28T03:21:31Z\">Sep 28, 2016</relative-time>\n</div>\n\n<div class=\"title\">\n prasadsurase commented on pull request joshsoftware/code-curiosity#137\n</div>\n\n<div class=\"details\">\n <img alt=\"#prasadsurase\" class=\"gravatar\" height=\"30\" src=\"https://avatars3.githubusercontent.com/u/562052?v=3&s=60\" width=\"30\" />\n <div class=\"message markdown-body\">\n <blockquote>\n <p>#BandanaPandey Same here.</p>\n </blockquote>\n </div>\n</div>\n"