I've already defined a ran the code def myname():
print("My name is Bill") and it runs on the console. But when I try to re-run it on the console, it says "NameError: name 'myname' is not defined".
It keeps showing the same thing only when write and run the code on the console.
Related
Error HH601: Script scripts/buy-coffee.js doesn't exist. when I try to run smart contract it shows the hh601 error while run in the terminal how to fix the error
First of all, make sure you got the buy-coffee.js in the scripts folder
If it is there then, run it via this command,
npx hardhat run ./scripts/buy-coffee.js
don't forget to accept the answer.
I've written a Powershell script to automate a Web UI test using IE. The script runs fine when I execute it from PowerShell. However, I have run into an obscure problem and that is when I run my Web UI test script from another powershell script, it fails. I tried to debug it and found that it fails on the following line.
$button = $ie.Document.getElementsByTagName("button")
$button.Item().Click() # $button.Item() evaluates to null when the script is executed from another script.
Can anyone help me figure this out? It appears that when I run the script, the script has no issues locating the element, but when it is run from another script the element I am looking for cannot be located.
EDIT
I get the same error when I run the PS script through Task Scheduler. The script only works when I invoke it directly. If I invoke via another script/program, it doesn't work.
I installed MonoDevelop on Ubuntu following these instructions:
http://www.monodevelop.com/download/linux/
I opened a new console project and ran a simple "Hello World" code.
Then, I got the following error:
Do you know how to resolve it?
Try changing the 'custom configuration' from tab run > run with > custom configuration > uncheck run on external console > run this works for printing on console but cant insert values, ReadLine() does not works.
i have created a very simple console application in vb.net that emails me some info from the db daily. everythign works in my dev environment, however when i move it out to production and try to run the executable, i get the following error message:
"A problem caused the program to stop working correctly. please close the program"
i have put in some exception checks in the code:
Dim output As String
Try
output = FormatIndividualRecords(False)
'SaveToFile(output, "NIndividualRecords.doc")
''email files
'Emailusers()
Catch e As Exception
WriteLine(e.Message)
End Try
and i expected the error to show up on the application console, but it does not, is there another way for me to see what error is being thrown? there is no development environment set up in production (no visual studio, etc), is there maaybe a log that that i can look at? how do i catch the error that's causing the app to fail?
Thank you in advance!
EDIT: i chagned the WriteLine(e.Message) to console.write(e.message) now there appealrs to be a message on the console when i run the application, but it blinks too fast and closes, i don't have time to see what it is... how can i get the console application to remain open?
Try directing output of the app to a file, rather than to the console...
MyProgram.exe > log.txt
I'm having small problem with the rails console in Rails 3.
I'm using a Mac and zsh in terminal. When I run the rails console I'm prompted with this:
ruby-head :001 >
When I try to use the up arrow to repeat last command I get an error sound and the command is not shown. Also to use tab as auto complete I have to press tab twice.
Another problem is that it takes about 10 seconds from I give the rails console command until the console is displayed. Is that normal?
Regards,
Johann
Check for a file in your home directory called .inputrc and see if it contains:
set editing-mode vi
For me that was the issue and removing that line sets things back to normal. Now I'm just wondering how on earth that file ended up getting created.