Model.Classify() gives GL_INVALID_OPERATION: Object cannot be used because it has not been generated - tensorflow.js

https://github.com/tensorflow/tfjs/issues/1384#issue-421174127
TensorFlow.js version
1.0.0
Browser version
Google Chrome: Version 73.0.3683.75 (Official Build) (64-bit)
Describe the problem or feature request
I followed the steps from Google Codelab: https://codelabs.developers.google.com/codelabs/tensorflowjs-teachablemachine-codelab/index.html#0
The given example works fine, but when I made some changes to the example for my Blog with multiple images, it gives this error:
As you can see, when I click on the first image, it works fine. Loads the model, does classification, displays the results. As I click on a second image, it gives these errors. This seems to be happening on this Windows Laptop [Dell Inspiron, Windows 10] with this Version of Chrome only as I am also testing the same thing on a MacBook Pro with the exact same version of Chrome without any errors.
Code to reproduce the bug/link to feature request
You can check my Blog here [https://anujdutt9.github.io/TFjs-ImageClassifier.html] and look for errors in the console. Also, you can find the complete code for this here [https://github.com/anujdutt9/anujdutt9.github.io/blob/master/TFjs-ImageClassifier.html].

This issue was resolved by using an updated version of TensorFlow.js. Take a look at the code with the update here: https://github.com/anujdutt9/anujdutt9.github.io/blob/master/TFjs-ImageClassifier.html

Related

How to use old chrome version in rsDriver

rsDriver(browser="chrome",port=4450L, chromever="74.0.3729.6")
the above command doesn't work since the chrome version mentioned is no longer supported(which used to work before) - since binman::list_versions("chromedriver") doesn't list it anymore.
i want to use the older version of chrome - anything before 75.
Is there any other method?
I also downloaded "74.0.3729.6" driver, but don't know how to use the downloaded driver in rsDriver.
use this code "binman::list_versions("chromedriver")" to see available versions of chrome then add it to rsDriver(chromever = "88.0.0.01") as an example

Click Link using Robot Framework doesn't work with Firefox

I'm new with Robot Framework. I made couple of scripts, that I have tested with Chrome and Firefox. With Chrome everything works fine, but with Firefox I have one tricky problem. I try to click link called Post like this:
Click Link link=Post
With Firefox it won't work and I just get following error:
ElementNotInteractableException: Message:
In Chrome, this same test is working fine.
Firefox version is 53.0.3 (64-bit).
Selenium Driver version: 3.4.3
Geckodriver version: 0.16.1
Any suggestions? What can I try?
You can use
Click Element xpath=(//a[text()='Post'])[1]
or there will be different class for mobile and web I guess.
You can add these to narrow down on single element out of two.
Something like:
Click Element xpath=//a[text()='Post']/parent::div[contains(#class,'web')]

Angular application works on Chrome but not Safari

My website works fine on Chrome but is broken on Apple Mobile Safari.
I have troubleshot the situation and have found that it is the below line of code placed in side of my angular controller that is causing the problem. With out this code everything works fine.
The code takes all images on the page and puts them inside of an array. Anything I can do differently to ensure proper compatibility? Thank you!
$scope.load_picture_cotent = function () {
$scope.pictures = Array.from(
document.querySelectorAll
('div.album [style^="background-image"]')).map
(el=>el.style.backgroundImage.replace(/url\((.*)\)/,'$1')
.replace(/"/g,'')
.replace(/thumbnails/,'highresolution'));
console.log($scope.pictures);
}
You can also view the website here.
Please let me know if you need any more information or would like me to expand my post to include more information.
you are using ECMA 2015 lambda notation, try to wrap this with babel and try it again, did you check the browsers compatibility status with ECMA Script 2015?
Thank you bretanac93.
He was right, I was using a newer version of Javascript than is currently supported by browsers.
He recommended I use Babel which is a compiler that converts new Javascript to a compatible Javascript.
I used babel to compile the compatibility javascript and it works like a charm.

AngularJS not working on some browsers/devices

I'm using Angular on my site, but I've been having reports on it often not working. Often users have to try different browsers/devices to get it to work. On my computer it works fine on Chrome, Opera and Firefox, latest versions. I've had reports of the page not working for visitors when using Firefox (version 31.6.0) and Safari though.
I have a smartphone of brand Öwn (Chilean or Peruvian I think), and the angular code does not work on this phone. I've tried using Chrome and the Öwn browser (some browser of their own). I have expandable content powered by jQuery, and that works fine, so it's definitely only Angular the page has problems with.
I tried removing all dependencies (using ngAnimate and ui.bootstrap for datepicker, and ngDialog), but still doesn't work on my phone.
I'm sorry I don't have more details. This is the page where the problems happen:
https://www.easterisland.travel/tours/
Does anyone have a clue? Thank you!
The problem in the end was in the code of an Angular function. When declaring a new object, I hadn't applied a value to one of the variables. This:
var tourObj = {groupId: groupId, pricePP: pricePP, savingsPP};
should have been this:
var tourObj = {groupId: groupId, pricePP: pricePP, savingsPP: savingsPP};
It was tricky since some browsers accepted it (Chrome and later Firefox) but many didn't. To locate the problem I checked error console of Safari Mac, and all it said was that angular.min.js.map and angular-animate.min.js.map were missing. .map files are for showing debug messages with minified code. Once the .map files had been added (find .map files for angular here, clicking folder for your angular version), the error console showed me exact location of the error.

Qooxdoo - Theme to use is not available

I have an qx v2.0.1 app working off the local file system and it runs fine in Firefox v14, but in Chrome v18 it gives me this error:
Uncaught Error: The theme to use is not available: edd.theme.Theme
qx.Class.define.members.initializeMeta.js:108
qx.Class.define.members.mainAbstractGui.js:82
qx.Class.define.members.baseObject.js:141
qx.Class.define.members.mainApplication.js:38
qx.Class.define.statics.readyBaseInit.js:77
qx.Class.define.members.dispatchEventDirect.js:134
wrappedFunctionInterface.js:451
qx.Class.define.members.dispatchEventManager.js:873
qx.Class.define.statics.fireEventRegistration.js:310
qx.Class.define.members.__fireReadyApplication.js:188
qx.Class.define.statics.onScriptLoadedApplication.js:106
qx.$$loader.signalStartupedd.js:159
qx.$$loader.initUrisedd.js:195
I thought I've come across this before and a ./generate.py distclean fixed it, but not this time. Someone else had a similar bug that was fixed:
http://bugzilla.qooxdoo.org/show_bug.cgi?id=1463
Any ideas?
This question is too tricky, and probably involves things like looking at verbose generator output and your job configs, so it is not really suitable for a Q&A site. I suggest you open up a bug for it at the qooxdoo project.
Interestingly enough, after a computer reboot it started working in chrome again. So the chrome clear browser cache/history everything since the beginning of time must not catch everything. So now it's working again...odd.

Resources