rasa handle_message("my_message") gives me none result - rasa-nlu

agent.handle_message("hi") gives me a None result in my code. I loaded interpreter correctly.
When i run interpreter.parse("my_message"), it gives me correct result.

Related

Metasploit: Invalid argument(s) Prepending a value with '-' will exclude any matching results

I want to sort the search command result by its date (disclosure_date) so I can see the latest exploits. However for some reason sorting by the command line option "-s" with the date property doesn't work, while for example "rank" does.
While this outputs a normal result (around 1300 lines of modules)
msf6 > search platform:windows type:exploit -s rank
This outputs the following error.
msf6 > search platform:windows type:exploit -s disclosure_date
[-] Invalid argument(s)
Usage: search [<options>] [<keywords>:<value>]
Prepending a value with '-' will exclude any matching results.
If no options or keywords are provided, cached results are displayed.
Versions:
msf6 > version
Framework: 6.0.55-dev
Console : 6.0.55-dev
I thought it may be solved by upgrading the version, so I cloned the repo and manually built from the Dockerfile to a docker image, and tested on the latest version as follows, but it still keeps showing the issue.
> version
Framework: 6.1.37-dev
Console : 6.1.37-dev
What can I do? Thanks.

How to fix mallet on gensim

I wrote LDA model in notebook.
I'm trying to wrap my gensim LDA model with mallet, getting the following error:
CalledProcessError: Command '../input/mymallet/mallet-2.0.8/bin/mallet import-file --preserve-case --keep-sequence --remove-stopwords --token-regex "\S+" --input /tmp/fbcc4b_corpus.txt --output /tmp/fbcc4b_corpus.mallet' returned non-zero exit status 126.
The error raised because of the second line:
mallet_path = '../input/mymallet/mallet-2.0.8/bin/mallet' # update this path
ldamallet = gensim.models.wrappers.LdaMallet(mallet_path, corpus=corpus, num_topics=20, id2word=id2word)
The path is correct.
Tried this solution: Gensim mallet CalledProcessError: returned non-zero exit status
didn't work for me..
I spent hours trying to solve it.
Tried this solution and nothing worked.
Looking to a previous sucessfull call I made to LDA Mallet, I noticed some parameters were not being set, then I made it like this:
gensim.models.wrappers.LdaMallet(mallet_path=mallet_path, corpus=corpus, num_topics=num_topics, id2word=id2word, prefix='temp_file_', workers=4)
I really hope it helps you. Finding a solution to this problem is a pain.
I don't know if you ever solved this or not, but I have run into the same problem. For me, the problem occurred because I had uploaded the mallet binary to a research server, where Mallet lost its executable flag. My solution was to run
chmod -R +x mallet-2.0.8
This allowed the gensim wrapper, or whatever means you wish to run mallet, to run the executable file. If you want to be more precise with the chmod, you could probably chmod the actual mallet-2.0.8/bin/mallet file.

How can I handle the error in load_svmlight_file?

when I run this code in mac:
x_train, y_train = load_svmlight_file("mq2008.train")
I get this error in bash:
-bash: syntax error near unexpected token `('
and if I run it in shell, I face this error:
NameError: name 'load_svmlight_file' is not defined
How can I solve this problem?
Welcome to StackOverflow!
IMO, you have a Python code and trying to replicate its output. If so, you should first load all Python-related imports first. This is what it means to NameError here, Python interpreter is not able to understand what it is, because this function is not part of its existing definitions it has.
If I may suggest, please spend some time to get the hands-on-learning of Python.

How can I make Ansible show only errors in execution?

How can I make ansible show only errors inside of some playbook, or even when directly invoked?
I tried suppressing std output but that apparently didn't help, because execution errors seem to be put into standard output instead of error output on Linux.
ansible all -a 'some_command_I_want_to_know_if_it_crashes' 1> /dev/null
I see only errors from Python (exceptions etc.) but not errors from playbook (the red text).
Use the official sample callback plugin called actionable.py.
Put it in the callback_plugins directory and enable stdout-callbacks in ansible.cfg:
[defaults]
stdout_callback = actionable
Just by enabling it you will get much less information in th output, but you can further modify the plugin code to suit your needs.
For example to disable messages on successful tasks completely (regardless if status is ok or changed) change:
def v2_runner_on_ok(self, result):
if result._result.get('changed', False):
self.display_task_banner()
self.super_ref.v2_runner_on_ok(result)
to
def v2_runner_on_ok(self, result):
pass
As Konstantin Suvorov noted, the above ansible.cfg configuration method works for ansible-playbook.
For ansible output you can save the actionable.py as ./callback_plugins/minimal.py to achieve the same results.
You could run the command with actionable callback
ANSIBLE_STDOUT_CALLBACK=actionable ansible all -a 'some_command_I_want_to_know_if_it_crashes'

rake jasmine:headless rake aborted, yet all specs pass

Only things that I can think of is this output here:
TypeError: Result of expression 'text' [null] is not an object.
Here is the full output:
TypeError: Result of expression 'text' [null] is not an object.
..
PASS: 2 tests, 0 failures, 0.004 secs.
Test ordering seed: --seed 7079
rake aborted!
Jasmine::Headless::TestFailure
Tasks: TOP => jasmine:headless
(See full trace by running task with --trace)
I understand this should not be a console.log issue, but to be safe, I removed EVERY SINGLE reference to console.log in all js / coffeee script files. grepped for it, and it's gone in the application. Cleared out the files in /tmp/cache/assets/ and still I get this TypeError, thought all specs pass. Really putting a damper on continuous integration.
Running a stack trace simply shows that the error occurs because the result of Jasmine::Headless::Runner is the value 1...
Anyone run across this issue / find a fix?
On the flip side, if anyone knows how to force Jasmine to report the TypeError as an error, I'll take that too. Just looking for some consistency in what is reported and what the status of my builds will be...
My disgusting hack to get error code correct:
bundle exec jasmine-headless-webkit | sed "s/\e\[\d+m//g" > ./jasmine.txt
passing=`cat ~/jobs/jasmine/workspace/jasmine.txt | grep "PASS:"`
echo passing=$passing

Resources