Node not able to log my request in terminal - node.js

I am relatively new to coding node and keep coming across barriers when trying to learn, I am following a course and when trying to run the attached code snippet I keep receiving error messages.
I have tried to follow all the suggested articles and advice I can find but can't get a result.
Can someone help? VS code - terminal output

You are in node env, you need to exit by press "control + D" and try it again.

Related

The system cannot find the path specified. ; No such process [Op:ReadFile]

I looked for different ways to solve this error... Even though I am not an advanced programmer I am trying to learn how to use machine learning. I am working in vs code(.ipynb file, tf(python 3.10.8)) using all extensions, TensorFlow installed(2.10.0). Please help if you know the answer, but not the reinstalling tenser one, since I have already tried it.
code
error
error
Then I put it in c: where the packages were installed and got the next thing: error2
If you need any additional information, please ask.

Issue with viewing data transformation with PyTorch

I am currently trying to process data for a simple network. This is the code I entered:
Screenshot here
I keep getting this error message but can't find any syntax problems or anyone else with this issue, I'm guessing it's something to do with my vienv because I've seen tutorials of people with no issues and that exact code. It's possible I haven't imported a package into my IDE and I am using anaconda and PyCharm if that helps.
Anyway, this is the error message I keep getting.
Error Message
You need to use transforms.ToTensor() instead of transforms.ToTensor when passing to transforms.Compose.

Golem Task respons back with runtime error 2, can't determine the cause

Repo for all code I've been using is updated here . When I run the requestor script it exits with a runtime error 2 (File not found). I am not sure how to further debug this or fix it. So far I've converted my code over to a python slim docker image to better mirror the example. It also works for me when I spin up a docker image that typing and running "/golem/work/imageclassifier.py --trainmodel" works from root. I switched all my code to use absolute paths. I also did make sure the shebang (#!) uses linux end of file characters rather than windows before which was giving me errors. Fixed a bug where my script returns error code 2 when called with no args to now pass.
clf.fit(trainDataGlobal, trainLabelsGlobal)
pkl_file = "classifier.pkl"
with open(pkl_file, 'wb') as file:
pickle.dump(clf, file)
is the only piece I could think of that causes the issue, but as far as I can tell this is the proper way to pickle something in python. Requestor script is also heavily based on the simple service example and I tried to mirror my design to that. I just need help in getting more information while debugging, or guidance on how to move forward from here

Trying to launch my node.js program with npm but nothing happens

I am trying to make this slack bot run : https://github.com/lmammino/norrisbot
I am not very skilled with npm and node yet, but I follow his instructions and try to run the bot with the help of the npm start command.
Here's the output I get :
F:\norrisbot>npm start
> norrisbot#1.0.5 start F:\norrisbot
> node bin/bot.js
F:\norrisbot>
No error, but nothing happens either in the console or the slack general channel...
By the way I set up my BOT_API_KEY variable correctly (with the token.js method)
By your command prompt it's clear you're running in Windows. The operations for running Node properly in Windows are different in several ways from Mac/Linux, and a LOT (most?) of developers don't address these because they're on Mac/Linux themselves. Path formats, file locations, how you expose environment variables, and all sorts of things are different in Win.
Try hand-editing bin/bot.js in your locally cloned copy of the repo. Find this line at the end of the file:
norrisbot.run();
Change it to read as follows:
console.log('Running Norris Bot');
norrisbot.run();
console.log('Ran Norris Bot');
I bet you will find that either NEITHER of these lines gets printed, or only one does.
If NEITHER line gets printed, the issue is with the npm command improperly formatting the path to the executable script for Windows users. In that case, try running it as (make sure NodeJS is in your PATH):
node bin/bot.js
If only the FIRST line gets printed, there is almost certainly a bug elsewhere in the module itself. I didn't evaluate all of its code, and I'm not on Windows myself at the moment - I just use it often enough to be aware of its differences. But either way it will get you started on finding the issue, and if it's truly a bug, you can pursue the bug report I see you've already filed in Github.

undefined is not a function zombie.js

I'm new to both zombie and cucumber-js, so I apologize if I leave out anything important. If you need something I missed, please just ask.
I'm trying to get cucumber-js/zombie up and running on my XP box. I've had several issues along the way, but, with help, have gotten past those. Now I'm getting a new one. I have a test feature file with test files before it (basically pulled from the cucumber.js page on github). I installed both cucumber and zombie with a -g since it didn't see it otherwise. When I run the command cucumber-js features\myfeature.feature, I get the following error:
<projfolder>\features\support\world.js
this.browser = new zombie.Browser();
^
TypeError: undefined is not a function
(followed by a stacktrace)
I.am.lost.
I would greatly appreciate ANY help that ANYONE can give me on this.
node v0.8.17
cucumber v0.3.0
WinXP
don't know how to tell a version of zombie
I understand that this is coming quite late to the question, and the author may have moved on to something else. It is to help others, who may come to this question
Hopefully, your zombie is set to this -
var zombie=require("zombie");
Having clarified that, you need to change your step from
this.browser = new zombie.Browser();
to:
this.browser=new zombie();
and that should work fine.
There is a lot more to that, for more help check this API out.

Resources