Chrome 67 and Dojo - dojo

1.Which version of dojo works fine with chrome 67 or other higher versions?
2. Recently after the chrome upgrade- dojo.js does not loads and throws following error-
dojo.js:15 Error: multipleDefine
at _f (dojo.js:15)
at _f3 (dojo.js:15)
at def (dojo.js:15)
at dojo_en-us.js:1
(anonymous) # dojo.js:15
(anonymous) # dojo.js:15
_9 # dojo.js:15
req.signal # dojo.js:15
_f3 # dojo.js:15
def # dojo.js:15
(anonymous) # dojo_en-us.js:1
dojo.js:15 Error: multipleDefine
at _f (dojo.js:15)
at _f3 (dojo.js:15)
at def (dojo.js:15)
at Grid.js.uncompressed.js:11
(anonymous) # dojo.js:15
(anonymous) # dojo.js:15
_9 # dojo.js:15
req.signal # dojo.js:15
_f3 # dojo.js:15
def # dojo.js:15
(anonymous) # Grid.js.uncompressed.js:11
dojo.js:15 Error: multipleDefine
at _f (dojo.js:15)
at _f3 (dojo.js:15)
at def (dojo.js:15)
at OnDemandList.js.uncompressed.js:70
(anonymous) # dojo.js:15
(anonymous) # dojo.js:15
_9 # dojo.js:15
req.signal # dojo.js:15
_f3 # dojo.js:15
def # dojo.js:15
(anonymous) # OnDemandList.js.uncompressed.js:70
dojo.js:15 Error: multipleDefine
at _f (dojo.js:15)
at _f3 (dojo.js:15)
at def (dojo.js:15)
at List.js.uncompressed.js:51
(anonymous) # dojo.js:15
(anonymous) # dojo.js:15
_9 # dojo.js:15
req.signal # dojo.js:15
_f3 # dojo.js:15
def # dojo.js:15
(anonymous) # List.js.uncompressed.js:51
VM185:1 Uncaught ReferenceError: normal is not defined
at eval (eval at f (css.js.uncompressed.js:1), <anonymous>:1:1)
at f (css.js.uncompressed.js:1)
at Object.load (css.js.uncompressed.js:1)
at _e4 (dojo.js:15)
at dojo.js:15
at _9 (dojo.js:15)
at _ce (dojo.js:15)
at _35 (dojo.js:15)
at _36 (dojo.js:15)
at dojo.js:15
We are using dojo version 1.9.1
Could anyone please suggest about this?
It was working perfectly fine with previous versions of Chrome browser and we do not see any such error in IE browser for same version of dojo.
Thanks.

1. From my point of view 1.9 should work. I use latest in my project, but tried some basic things in JS fiddle and got no problems. My chrome version is 67.
2. Just and idea where to look... As far as I can see, this error can happen in case when you have multiple define functions in one file (module). At least I tried this and got same error.
if(module.injected === arrived){
signal(error, makeError("multipleDefine", module));
return module;
}
This code is from dojo.js
You could place a breakpoint there and check what's wrong with module.

Related

tensorflow TypeError: ParseFromString() missing 1 required positional argument: 'serialized'

this is my first time using tensor flow i want to try captcha solver i found in the internet but i got an error
the link the tutorial https://pylessons.com/TensorFlow-CAPTCHA-final-detection/
TypeError: ParseFromString() missing 1 required positional argument: 'serialized'
here is my code
# Load a (frozen) Tensorflow model into memory.
label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES, use_display_name=True)
category_index = label_map_util.create_category_index(categories)
detection_graph = tf.Graph()
with detection_graph.as_default():
od_graph_def = tf.GraphDef
with tf.gfile.GFile(PATH_TO_FROZEN_GRAPH, 'rb') as fid:
serialized_graph = fid.read()
od_graph_def.ParseFromString(serialized_graph)
tf.import_graph_def(od_graph_def, name='')
If you are using tensorflow version >= 2.0 then above code won't work. Below is the updated code which will work on tensorflow version > 2.0
with detection_graph.as_default():
od_graph_def = tf.compat.v1.GraphDef()
with tf.compat.v1.gfile.GFile(PATH_TO_FROZEN_GRAPH, 'rb') as fid:
serialized_graph = fid.read()
od_graph_def.ParseFromString(serialized_graph)
tf.compat.v1.import_graph_def(od_graph_def, name='')

Keras neural network "Function call stack: keras_scratch_graph"

I am trying to build a machine learning model using keras and I am getting below error
InvalidArgumentError: indices[1,1478] = 92260 is not in [0, 22000)
[[node embedding_3/embedding_lookup (defined at C:\Users\username\AppData\Local\Continuum\Anaconda3-5.2.0\lib\site-packages\keras\backend\tensorflow_backend.py:3009) ]] [Op:__inference_keras_scratch_graph_10071]
Function call stack:
keras_scratch_graph
code
filepath=".../weights-simple.hdf5"
checkpointer = ModelCheckpoint(filepath, monitor='val_acc', verbose=1, save_best_only=True, mode='max')
history = model.fit([X_train], batch_size=32, y=to_categorical(y_train), verbose=1, validation_split=0.25,
shuffle=True, epochs=3, callbacks=[checkpointer])
I even tried using below code, but I am still getting the error
tf.config.experimental.set_visible_devices([], 'GPU')
Can you please help me with the issue

Vue.js some errors/warnings are quite difficult to debug

While running a Vue.js app, I get a warning in the console that I cannot determine where it's coming from (in source code) or at least from which component I get it raised.
Here is the console output:
TypeError: Cannot read property 'length' of undefined
at _c.attrs.rules (eval at ./node_modules/vue-loader/lib/template-compiler/index.js?{"id":"data-v-012a975a","hasScoped":true,"optionsId":"0","buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/Contact_Form.vue (0.js:300), <anonymous>:252:41)
at VueComponent.validate (vuetify.js?dc48:8564)
at VueComponent.mounted (vuetify.js?dc48:8535)
at callHook (vue.runtime.esm.js?ff9b:2917)
at insert (vue.runtime.esm.js?ff9b:4154)
at Object.invoker [as insert] (vue.runtime.esm.js?ff9b:2019)
at invokeInsertHook (vue.runtime.esm.js?ff9b:5956)
at VueComponent.patch [as __patch__] (vue.runtime.esm.js?ff9b:6175)
at VueComponent.Vue._update (vue.runtime.esm.js?ff9b:2666)
at VueComponent.updateComponent (vue.runtime.esm.js?ff9b:2784)
logError # vue.runtime.esm.js?ff9b:1737
globalHandleError # vue.runtime.esm.js?ff9b:1728
handleError # vue.runtime.esm.js?ff9b:1717
callHook # vue.runtime.esm.js?ff9b:2919
insert # vue.runtime.esm.js?ff9b:4154
invoker # vue.runtime.esm.js?ff9b:2019
invokeInsertHook # vue.runtime.esm.js?ff9b:5956
patch # vue.runtime.esm.js?ff9b:6175
Vue._update # vue.runtime.esm.js?ff9b:2666
updateComponent # vue.runtime.esm.js?ff9b:2784
get # vue.runtime.esm.js?ff9b:3138
run # vue.runtime.esm.js?ff9b:3215
flushSchedulerQueue # vue.runtime.esm.js?ff9b:2977
(anonymous) # vue.runtime.esm.js?ff9b:1833
flushCallbacks # vue.runtime.esm.js?ff9b:1754
Promise.then (async)
microTimerFunc # vue.runtime.esm.js?ff9b:1802
nextTick # vue.runtime.esm.js?ff9b:1846
queueWatcher # vue.runtime.esm.js?ff9b:3064
update # vue.runtime.esm.js?ff9b:3205
notify # vue.runtime.esm.js?ff9b:693
reactiveSetter # vue.runtime.esm.js?ff9b:1010
(anonymous) # vue-router.esm.js?fe87:2508
(anonymous) # vue-router.esm.js?fe87:2507
updateRoute # vue-router.esm.js?fe87:1997
(anonymous) # vue-router.esm.js?fe87:1875
(anonymous) # vue-router.esm.js?fe87:1984
step # vue-router.esm.js?fe87:1714
step # vue-router.esm.js?fe87:1721
runQueue # vue-router.esm.js?fe87:1725
(anonymous) # vue-router.esm.js?fe87:1979
step # vue-router.esm.js?fe87:1714
(anonymous) # vue-router.esm.js?fe87:1718
(anonymous) # vue-router.esm.js?fe87:1964
(anonymous) # vue-router.esm.js?fe87:1757
(anonymous) # vue-router.esm.js?fe87:1833
Promise.then (async)
(anonymous) # vue-router.esm.js?fe87:1780
(anonymous) # vue-router.esm.js?fe87:1801
(anonymous) # vue-router.esm.js?fe87:1801
flatMapComponents # vue-router.esm.js?fe87:1800
(anonymous) # vue-router.esm.js?fe87:1736
iterator # vue-router.esm.js?fe87:1943
step # vue-router.esm.js?fe87:1717
step # vue-router.esm.js?fe87:1721
runQueue # vue-router.esm.js?fe87:1725
confirmTransition # vue-router.esm.js?fe87:1972
transitionTo # vue-router.esm.js?fe87:1874
init # vue-router.esm.js?fe87:2494
beforeCreate # vue-router.esm.js?fe87:540
callHook # vue.runtime.esm.js?ff9b:2917
Vue._init # vue.runtime.esm.js?ff9b:4622
Vue # vue.runtime.esm.js?ff9b:4725
(anonymous) # main.js?1c90:48
./src/main.js # app.js:1735
__webpack_require__ # app.js:708
fn # app.js:113
0 # app.js:1813
__webpack_require__ # app.js:708
(anonymous) # app.js:806
(anonymous) # app.js:809
It's from ./src/components/Contact_Form.vue
Look at the second line

How to use a model trained on GPU using CudnnLSTM on CPU?

Tensorflow version 1.6.0 on Ubuntu 16.04.
Network uses CudnnLSTM https://www.tensorflow.org/api_docs/python/tf/contrib/cudnn_rnn/CudnnLSTM
Model export and prediction works on GPU. But while exporting and inferencing on CPU gives the below error.
File "/home/deepak/.local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/python/layers/cudnn_rnn.py", line 501, in _create_saveable
name="%s_saveable" % self.trainable_variables[0].name.split(":")[0])
File "/home/deepak/.local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py", line 262, in __init__
weights, biases = self._OpaqueParamsToCanonical()
File "/home/deepak/.local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py", line 315, in _OpaqueParamsToCanonical
direction=self._direction)
File "/home/deepak/.local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/ops/gen_cudnn_rnn_ops.py", line 769, in cudnn_rnn_params_to_canonical
name=name)
File "/home/deepak/.local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/deepak/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3290, in create_op
op_def=op_def)
File "/home/deepak/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1654, in __init__
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'CudnnRNNParamsToCanonical' with these attrs. Registered devices: [CPU], Registered kernels:
<no registered kernels>
[[Node: CudnnRNNParamsToCanonical = CudnnRNNParamsToCanonical[T=DT_FLOAT, direction="bidirectional", dropout=0, input_mode="linear_input", num_params=16, rnn_mode="lstm", seed=0, seed2=0, _device="/device:GPU:0"](CudnnRNNParamsToCanonical/num_layers, CudnnRNNParamsToCanonical/num_units, CudnnRNNParamsToCanonical/input_size, cudnn_lstm/opaque_kernel/read)]]
And the export code is as below:
with tf.Graph().as_default() as graph:
inputs, outputs = create_graph()
# Create a saver using variables from the above newly created graph
saver = tf.train.Saver(tf.global_variables())
with tf.Session() as sess:
# Restore the model from last checkpoints
ckpt = tf.train.get_checkpoint_state(FLAGS.checkpoint_dir)
saver.restore(sess, ckpt.model_checkpoint_path)
# (re-)create export directory
export_path = os.path.join(
tf.compat.as_bytes(FLAGS.export_dir),
tf.compat.as_bytes(str(FLAGS.export_version)))
if os.path.exists(export_path):
shutil.rmtree(export_path)
# create model builder
builder = tf.saved_model.builder.SavedModelBuilder(export_path)
input_node = graph.get_tensor_by_name('input_node:0')
input_lengths = graph.get_tensor_by_name('input_lengths:0')
outputs = graph.get_tensor_by_name('output_node:0')
# create tensors info
predict_tensor_inputs_info = tf.saved_model.utils.build_tensor_info(input_node)
predict_tensor_inputs_length_info = tf.saved_model.utils.build_tensor_info(input_lengths)
predict_tensor_scores_info = tf.saved_model.utils.build_tensor_info(outputs)
# build prediction signature
prediction_signature = (
tf.saved_model.signature_def_utils.build_signature_def(
inputs={'input': predict_tensor_inputs_info,'input_len':predict_tensor_inputs_length_info},
outputs={'output': predict_tensor_scores_info},
method_name=tf.saved_model.signature_constants.PREDICT_METHOD_NAME
)
)
# save the model
builder.add_meta_graph_and_variables(
sess, [tf.saved_model.tag_constants.SERVING],
signature_def_map={
'infer': prediction_signature
})
builder.save()

Rally.ui.chart.CumulativeFlowChart Error

I am new to node js and rally app development. I am trying to build a custom rally cumulative flow chart.
I am following the youtube tutorials by rally engineers. Using rally-app-builder to build the app.
My custom app throws below error on run.
sdk-debug.js:6582 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
loadScriptFile # sdk-debug.js:6582
require # sdk-debug.js:6758
syncRequire # sdk-debug.js:6624
(anonymous) # sdk-debug.js:2303
instantiate # sdk-debug.js:5686
(anonymous) # sdk-debug.js:2303
_loadCumulativeFlowChart # App.js?_dc=0.7676518726557986:11
launch # App.js?_dc=0.7676518726557986:5
_applyDefaultSettingsAndLaunch # sdk-debug.js:155148
loadSettingsAndLaunch # sdk-debug.js:155054
initComponent # sdk-debug.js:155032
constructor # sdk-debug.js:30211
callParent # sdk-debug.js:4469
constructor # sdk-debug.js:34291
callParent # sdk-debug.js:4469
constructor # sdk-debug.js:144823
callParent # sdk-debug.js:4469
constructor # sdk-debug.js:154985
constructor # sdk-debug.js:5100
(anonymous) # VM302:3
instantiate # sdk-debug.js:5692
(anonymous) # sdk-debug.js:2303
_createApp # sdk-debug.js:225546
_launchAppInViewport # sdk-debug.js:225453
(anonymous) # sdk-debug.js:225410
_loadTimeboxScope # sdk-debug.js:225541
(anonymous) # sdk-debug.js:225409
(anonymous) # sdk-debug.js:225308
(anonymous) # sdk-debug.js:10091
fire # sdk-debug.js:10046
Ext.apply.readyEvent.readyEvent.fire # sdk-debug.js:10285
fireReadyEvent # sdk-debug.js:10363
onDocumentReady # sdk-debug.js:10381
fn # sdk-debug.js:6865
onReady # sdk-debug.js:6870
Ext.onReady # sdk-debug.js:11162
_callOnReadyFns # sdk-debug.js:225304
(anonymous) # sdk-debug.js:146417
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:2260
(anonymous) # sdk-debug.js:146417
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:146435
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:2260
(anonymous) # sdk-debug.js:146417
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:2260
(anonymous) # sdk-debug.js:146417
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:146423
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:146435
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:146435
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
callback # sdk-debug.js:223192
sdk-debug.js:6583 GET http://localhost:1337/Rally/ui/chart/CumulativeFlowChart.js?_dc=1512571924759 404 (Not Found)
loadScriptFile # sdk-debug.js:6583
require # sdk-debug.js:6758
syncRequire # sdk-debug.js:6624
(anonymous) # sdk-debug.js:2303
instantiate # sdk-debug.js:5686
(anonymous) # sdk-debug.js:2303
_loadCumulativeFlowChart # App.js?_dc=0.7676518726557986:11
launch # App.js?_dc=0.7676518726557986:5
_applyDefaultSettingsAndLaunch # sdk-debug.js:155148
loadSettingsAndLaunch # sdk-debug.js:155054
initComponent # sdk-debug.js:155032
constructor # sdk-debug.js:30211
callParent # sdk-debug.js:4469
constructor # sdk-debug.js:34291
callParent # sdk-debug.js:4469
constructor # sdk-debug.js:144823
callParent # sdk-debug.js:4469
constructor # sdk-debug.js:154985
constructor # sdk-debug.js:5100
(anonymous) # VM302:3
instantiate # sdk-debug.js:5692
(anonymous) # sdk-debug.js:2303
_createApp # sdk-debug.js:225546
_launchAppInViewport # sdk-debug.js:225453
(anonymous) # sdk-debug.js:225410
_loadTimeboxScope # sdk-debug.js:225541
(anonymous) # sdk-debug.js:225409
(anonymous) # sdk-debug.js:225308
(anonymous) # sdk-debug.js:10091
fire # sdk-debug.js:10046
Ext.apply.readyEvent.readyEvent.fire # sdk-debug.js:10285
fireReadyEvent # sdk-debug.js:10363
onDocumentReady # sdk-debug.js:10381
fn # sdk-debug.js:6865
onReady # sdk-debug.js:6870
Ext.onReady # sdk-debug.js:11162
_callOnReadyFns # sdk-debug.js:225304
(anonymous) # sdk-debug.js:146417
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:2260
(anonymous) # sdk-debug.js:146417
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:146435
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:2260
(anonymous) # sdk-debug.js:146417
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:2260
(anonymous) # sdk-debug.js:146417
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:146423
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:146435
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
(anonymous) # sdk-debug.js:146435
notify # sdk-debug.js:146514
complete # sdk-debug.js:146495
resolve # sdk-debug.js:146359
callback # sdk-debug.js:223192
sdk-debug.js:147611 Error: success callback for Deferred transformed result of Deferred transformed result of Deferred threw: TypeError: c is not a constructor
at eval (eval at getInstantiator (sdk-debug.js:5720), <anonymous>:3:8)
at Object.instantiate (sdk-debug.js:5692)
at Object.create (sdk-debug.js:2303)
at constructor._loadCumulativeFlowChart (App.js?_dc=0.7676518726557986:11)
at constructor.launch (App.js?_dc=0.7676518726557986:5)
at constructor._applyDefaultSettingsAndLaunch (sdk-debug.js:155148)
at constructor.loadSettingsAndLaunch (sdk-debug.js:155054)
at constructor.initComponent (sdk-debug.js:155032)
at constructor (sdk-debug.js:30211)
at constructor.callParent (sdk-debug.js:4469)
Below is my source code
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function () {
this._loadCumulativeFlowChart();
},
_loadCumulativeFlowChart: function(){
var endDate = Rally.util.DateTime.fromIsoString('2017-06-30T00:00:00Z');
var startDate = Rally.util.DateTime.add(endDate, 'day', -5);
var cumulativeFlowChart = Ext.create('Rally.ui.chart.CumulativeFlowChart', {
storeConfig: {
context: {
workspace: '/workspace/14370822888'
},
filters: [
{
property: '_ItemHierarchy', value: 6342428390
},
{
property: '_Type', value: 'HierarchicalRequirement'
},
{
property: 'Children', value: null
}
]
},
cumulativeFlowConfig: {
timeZone: 'America/Denver',
aggregationType: 'count',
groupByFieldValues: ['Defined', 'In-Progress', 'Completed', 'Accepted'],
startDate: startDate,
endDate: endDate
}
});
this.add(cumulativeFlowChart)
}
});
Let me know what i am doing wrong here. Thanks in advance.
That error usually happens when you're trying to create something that doesn't exist. In this case, probably the Rally.ui.chart.CumulativeFlowChart object. Is that a component that you have created? Is it specified in the javascript section of your config.json before App.js?