I'm running NPP 6.3.1 (UNICODE) and the current pythonscript plugin (python 2.7.6, pythonscript 0.9.2.0)
I recently got a new machine and had to reinstall both NPP and PythonScript (PS). I wrote a basic script a little while ago and had been using it a good bit and it worked fine using the PS plugin.
I installed everything and run the script through the PS plugin menu but nothing happens. I try it again and now, I keep getting the following error:
Another script is currently running. Running two scripts at the same time could produce unpredictable results, and therefore is disabled.
The script is designed to search the document and find the next available point number and insert it at the cursor. Like I said, it's a simple script that has a defined start and end. I've never had a problem with it before. So, I decided to create a new script (test.py) which consists entirely of the following:
console.write("test")
Nothing. The console doesn't show any activity no matter what I do, which leads me to believe that the script isn't even starting, even though it says that it loads up (in 16ms) and says its ready...
I tried uninstalling everything and reinstalling but still nothing. I haven't tried previous versions yet.
Am I missing something stupid?
The problem was that I did not have the most current version. After installing version 6.6.6 and PythonScript 1.0.2, it works.
Just want to leave this information for the next people who come in with this problem.
Related
I have a real odd behavior with my VSCode environment (macos v1.48.0) specifically with the Python extension. This only occurred recently, previously not a problem and debugging such code worked fine. My problem is I'm trying to debug a script that initially makes a user input request data = input("text") and after entering text into the terminal, the execution never resumes. I've ensured my launch settings script is valid and expected. I've actually gone through completely uninstalling and reinstalling VSCode. Additionally, the script runs as expected outside of VSCode. Obviously the motivation is to debug the code far beyond user input, and of course I can hardcode user input values to bypass these function calls, rest of the script runs fine, but I'm simply at a loss for why execution isnt resuming after this call to input... ??
Much thanks in advance.
According to your description, you could refer to the following ways:
Please try to set a breakpoint for it to check whether it can be debugged successfully.
Since the debugging function of the python script is provided by the python extension, you could try to disabled other extensions and reinstall the python extension.
If the python extension you are using is the latest version, it is recommended that you downgrade it and use other versions of python extensions. For example:(python version: v2020.7.96456)
I am trying to get started with Python, so I installed Python 3.8, from python.org (on Windows 10). I remembered to check the "Add to PATH" during the installation and I have confirmed that it has been added to path, as seen in the first image.
However, when I try to use any commands, whether it be python --version or python HelloWorld.py, nothing happens. I have tried both the traditional command line as well as Powershell. I have also tried replacing python with python3, the result is the same. As you can see in the second image, I get no errors, just a blank line. So it's not that it cannot find Python at all, it rather seems that something is wrong with the installation.
Have anyone else encountered this kind of behavior? I have tried re-installing Python as well as removing old installations.
Image 1: Python seems to be correctly added to PATH.
Image 2: Python fails to return any output. But also no error. Same thing happens with python HelloWorld.py.
Update 1 - Here is what I have tried so far:
Changing PATH to refer directly to exe file.
Using both Command Prompt and PowerShell.
Rebooting the PC.
Re-installing Python (including removing old versions).
Both the python and python3 command.
Update 2 - NameError: name 'python' is not defined
Update on the update: This was a wild goose chase. You are not supposed to be able to use that command in the interpreter, as described in this post.
So I tried to use the console from the python.exe file instead, and I got the following answer. However, from what I can find on it, it's normally a problem you encounter on elements of the code (like print()) and not on the python command...?
(image removed)
Update 3 - It works (kinda)
If I use the command py --version or py test.py it works. I have no clue why though...
After extensive research, I still cannot find an answer to my own question. But I have found a work around, which minimizes the consequences:
Instead of using python, simply use py.
This will invoke the Python launcher instead of Python itself (from what I've read). For most people this will be good enough, but it is not the same. So it might cause issues and version mismatch in certain scenarios.
Also, despite of this weird behavior, Python seems to run fine in Visual Studio Code, when using the "Run" button (or the py command in the terminal).
I have python 3.5 installed on my Windows 10 system. I am using Rodeo 2.5.2 as the interpreter. I had written a python code >800-900 lines on the same. When I try to select it all and trigger it, it just says "Unable to Execute" and shows nothing else whereas when I try to select ~100-200 lines and then run it chunk by chunk it works fine. I am not able to understand why this is happening & how to solve this.
Check if you have some functions which are not being used in the main function.
I had a similar issue and it was resolved as soon as I erased all the functions which were useless and didn't appear in my main function
Good Luck
I installed python 2.7.10 on my 1and1 linux hosting service about 8 months ago (using instructions from http://geeksta.net/geeklog/python-shared-hosting/) and everything was working fine (I had a daily cron job that would call my python script). But recently,my python script stopped working and it appears that the call to python itself is the culprit, rather than the python code. Whenever I type 'python' into the command line in the 1and1 unix ssh session now, i get the following error message
"-bash: /kunden/homepages/26/xxxxxxxxxx/htdocs/python27/bin/python: No
such file or directory"
It's been awhile since I installed things, but I don't believe I had this issue previously. I'm trying to figure out why it's not working and what I can do to get it fixed. It appears that calling python isn't working properly (which would affect my script as well).
Any help with getting this working would be greatly appreciated.
when you type python, system find it in /kunden/homepages/26/xxxxxxxxxx/htdocs/python27/bin/python, but there is no such a file in fact.
what you need to do is trying to locate your python binary executable file, and alias your python to your file
I ended up just reinstalling python 2.7 again and it works again. Not sure why it stopped working before.
Now I can type "python" in the command line and it starts the Python console.
I moved a script I was working on to another computer with the same version of python. When I try running the script on the second computer, I get an error that reads
error running myscript: Executable is not specified
Tried looking it up, didnt' seem to find anything.
Is it possible this is because I installed python alone on the first computer, but anaconda on the second? I'm not really sure what could cause the error. As far as I can tell it has nothing to do with the code. Tested on the original computer and worked fine.
Ended up just creating an executable through py2exe rather than trying to figure out what was going on with the paths. Works perfectly.