Builtin functions and values being tagged as undefined - pydev

False, isinstance, list, int, setattr, range, and many others are being tagged as undefined. I"m running Aptana Studio 3 version 3.2.
I have run both of the interpreter updates:
- Window / Preferences / Interpreter - Python / Apply
- Properties / PyDev - PYTHONPATH / Apply
cleared error markers, etc. Nothing seems to work.
...Thanks,
...Ken
I am curious as to what happened, but my patience gave way to irritation, so I re-installed from scratch and all is well. I'm guessing the latest update from Aptana ate something that disagreed with it, but it's hard to tell. I did save the previous install in case someone has an idea for me to test.

Usually this means that PyDev was not able to create a shell/sockets to the shell (usually meaning you either have some firewall enabled blocking the communication or you have a misconfiguration in your pythonpath).
So, it'd be nice if you could share if you have something in your error log in that old installation -- but if it's all working on your new, I'm not sure it's worth the time :)
Also related: http://pydev.org/faq.html#PyDevFAQ-WhenIdoacodecompletion%2CPyDevhangs%2CwhatcanIdo%3F

I had this same problem and switched to pycharm. It's wonderful!

Related

NetBeans 12.3 - Code completion and code suggestion very slow

All of a sudden the code completion and suggestion (for example when typing the . operator listing the possible methods on an object, etc.) is very slow, also fixing imports. Restarting the IDE didn't solve it.
I cannot see any other task NetBeans is running.
What can be the cause?
Is it because the update to 12.4 is coming up and NetBeans gathers some data or metrics :)
Otherwise the IDE is working normal, quick as usual.
Check if the performance is same when you deactivate your antivirus
Check in the About window of NetBeans where your cache directory is located and rename/delete it
You can try it with most recent release 12.4. It's not yet published on their website but you can download it anyway: https://www.apache.org/dyn/closer.cgi/netbeans/netbeans/12.4/netbeans-12.4-bin.zip

Duplicate hints while typing expression in Visual Studio Code

Why do I have the same suggestions while typing expression?
Example:
I had exactly the same problem. After a week or so, it get really annoying.
basically, as the comments hint to, there are probably multiple linting or intelisense tools. In my case (for python) i had the pylance extension added.
When i disabled this, the problem went away, but features were missing. So i added it back...
For some reason (i dont know why), this fixed the problem !!!
I can only hypothesise that in some way the extension was corrupted. Nevertheless, it worked.
EDIT:
I can also confirm that unchecking this setting appears to work:
Jupyter: Pylance Handles Notebooks
My current system is Windows 11, with python 3.10.
Final edit (8 Dec 2022):
This is resolved here:
Please could you install VS Code 1.74 and the latest Jupyter, PyLance and Python extension and confirm this still exists.
Visual Studio Code provides an API so third-party extensions and built-in modules can contribute suggestions for auto-completion pop-ups. The system is currently designed so suggestions are merely appended—there's no duplicate detection or removal (perhaps because extensions can also take care of sorting suggestions and such algorithm would get on the way). That means that if you have more than one extension or module for a given language you can easily get duplicate entries.
Having several extensions for PHP is not necessarily a bad idea since they can address different needs (for instance, PHP DocBlocker just creates annotations, it doesn't provide auto-completion suggestions) but you have at least two extensions (PHP Intelephense and PHP Intellisense) that do exactly the same things. That's likely to hurt performance (all your workspace files will be scanned several times) and just adds noise.
I suggest you read the extension descriptions carefully to learn what they do exactly and then figure out which ones you need. Remember that extensions can be enabled/disabled in a per-workspace basis.
The following is just my own totally subjective opinion. Among the PHP extensions that provide code intelligence only two of them seem mature enough:
PHP Intelephense
PHP Intellisense
I've tried both. PHP Intelephense works best for me than PHP Intellisense so that's the one I've kept. I've also disabled php.suggest.basic following the installation instructions because basic suggestions didn't add any value to me (they were blind string matching):
Turn off the php.suggest.basic setting for best results.
... as well as taming builtin Emmet support, which was providing really dumb suggestions:
"emmet.showExpandedAbbreviation": "inMarkupAndStylesheetFilesOnly"
YMMV.
TLDR; Installing pre-release version of Jupyter solves (v2022.11...)
Ok, so after some more extensive experimentation I think I found what's causing this in my case. After looking at the processes I noticed that there were two Pylance processes running, and consistently this would only be a problem if I was working in a session with a jupyter notebook open or one that had been opened.
saun89 17740 37.3 0.3 1008004 199492 ? Sl 20:58 0:22 /home/saun89/.vscode-server-insiders/bin/fef85ea792f6627c83024d1df726ca729d8c9cb3/node /home/saun89/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2022.11.32/dist/server.bundle.js --cancellationReceive=file:9178e897a2b78b36bfd167f79b36c3bdad2931d71b --node-ipc --clientProcessId=17651
saun89 18743 257 0.7 1304584 382288 ? Sl 20:59 0:20 /home/saun89/.vscode-server-insiders/bin/fef85ea792f6627c83024d1df726ca729d8c9cb3/node /home/saun89/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2022.11.32/dist/server.bundle.js --cancellationReceive=file:8744a321767eed92821fd737be4dc7dcfb728284e5 --node-ipc --clientProcessId=17651
Pylance basically spins up a service for the workspace, and then spins up a separate service for the notebook.
Output from "Python Language Server" logs:
Disabling Jupyter removes the duplication, and after installing an earlier version of the extension (v2022.4) this appears to have fully resolved the issue. I'm going to go ahead and log the extension bug once I have something reproducible.
As of 11/30/22, Jupyter Extension Pre-Release version v2022.11.1003281132 is the latest version fixes this issue. Click the gear icon next to the extension and you should see "install another version..." Then you can select version v2022.11.1003281132.

Pydev 3.0 + Eclipse + Google App Engine Debugging not working

I've been having problems getting debugging working with this setup for the past year. Supposedly, this is fixed in the latest versions, but I just can't seem to get it to work.
I'm using Mac OSX 10.8.5, Eclipse Keplar, PyDev 3.0.0, and Google App Engine 1.8.8.
I set up a run configuration to point to dev_appserver.py, running my project. That works fine. My python version is 2.7.3, and everything works in normal mode. When I try to run in debug mode, however, the app runs, the output specifically states:
pydev debugger: starting
pydev debugger: google app engine integration enabled
But after 20 seconds, the python process terminates with this error message:
'Launching New_configuration' has encountered a problem.
Timed out after 20.0 seconds while waiting for python script to connect.
Accept timed out
Execution works during those 20 seconds, because I can hit URLs connected to my app and see an effect. Breakpoints do not work, though. Is there something I need to do to get python to 'connect'?
Also - I should note that switching back to using 'old_dev_appserver.py' fixes this problem - debugging works fine when I do this. But, this is not really a solution, because I need to use the latest socket additions in the newer releases.
Thanks for any advice.
temporary solution:
edit the pydev_app_engine_debug_startup.py file:
eclipse/plugins/org.python.pydev_${VERSION}/pysrc/pydev_app_engine_debug_startup.py
change the line that reads:
if ':' not in config.version_id:
to:
if ':' not in config.version_id or config.version_id.startswith('default:'):
Looks like this is fixed in 1.9.0. I also had to make sure to update PyDev to the latest (3.3.3 at the time of this writing).
One more thing to add, and this one really tripped me up (on MacOS) -
In Eclipse, under Run -> Run Configurations, set the Main Module to point to this location:
/usr/local/google_appengine/dev_appserver.py
NOT the symlink:
/usr/local/bin/dev_appserver.py
Well, finally I found the answer. It is a Google's bug.
It has been reported and acknowledged.
see Debug is not working with PyDev again 1.8.8!
Update: Until the bug is fixed I am using PyCharm. The pro version has 30 days trial and works with GAE. It works like, well, a charm. I may even consider switching to it from Elicpse/PyDev
But I am used to JetBrains tools with Android Studio recnetly, and WebStorm and Resharper in the past, so I know to find my way around their IDEs. Your milage may and will vary.
Since the question, a new GAE has been released 1.8.9
Running GAE 1.8.9 with PyDev3.3.3 on Windows8.
This timeout issue still occurred.
When I entered the temporary workaround changes to pydev_app_engine_debug_startup described in the earlier answer, then the browser could not connect to the app.
However, on backing out this change, not only did the 'Launching New_configuration' not appear, but the breakpoints worked.
More info on the Python Tool Support for the App Engine Development Server is here
https://docs.google.com/document/d/1CCSaRiIWCLgbD3OwmuKsRoHHDfBffbROWyVWWL0ZXN4/edit

Coda 2.2 Plugins don't stay installed

I am having a small problem with plugins not staying installed with Coda 2.2 for Mac on OSX 10.6. Every time I close Coda and open it back up and then click on plugins half of them are gone even though the are in the plugins folder for the application. I have to close Coda and uninstall and reinstall the plugin then open it back up. That is only good until I close it then it starts all over again. Is there anything I can do or is there something I am overlooking that is causing this to happen?
-Thanks
I've been working with Panic support and we've discovered there's an issue with certain plugins. Most likely, it's only one that's problematic. For me, it was WVCPs plugin. Removing that from the plugin folder allows all other plugins to work fine.
I found it helpful looking at the Console app for messages from Coda and one by one dropped the plugins back into the plugins folder until I found the one that caused an error about incompatible architecture.
You can ignore the error about two plugins implementing the same class, that seems to be a mutual exclusion sort of warning but still allows the other plugins to work.
One other plugin had a different error but again, appears to work fine so probably it was just a warning.
This is probably your best solution until Panic push out an update, which I am assured is on the way.
Hope that helps!

Eclipse hangs while debugging

I searched lot about this topics but can't find a proper solution.
I am using eclipse 3.6 Helios version with operating system fedora15. In my application I am using GWT2.4 for front end development.
Now while I work with debug mode and want to debug at some point at the same time eclipse hangs for 3-4 mins.It resumes after and again start to debug process.
I am using this eclipse from last 3 years with windows but not faced this issue.In fedora I am using it from last 4 months and this problems stated to occur from last one month.
I am not getting what is the issues with eclipse.
Please help me out.
Thanks in advance.
Is this something that happens with different projects/code, or is it the same code that causes freezes? I've had issues where threads have started in the background and caused problems.
You say "(...) hangs for 3-4 mins.It resumes after and again start to debug process.", what do you mean? Does it continue to debug and move to the next line, or is there a crash and it restarts?
How long has it been since you changed workspace? I've found this, rather than the Eclipse installation, to be an issue over time. Create a new workspace folder, export all your projects and preferences and start fresh.
You are using GWT 2.4 and I think you might be working with UI.xml too... There is a tag in each ui.xml at the top like
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
Which means eclipse is going to get that xhtml.ent file each time and there is a issue in GWT eclipse plugin have a look to below link
http://code.google.com/p/google-web-toolkit/issues/detail?id=5265
There is one comment which says
For me, removing
SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"
and saving the document,
solves the problem..
maybe it is needed for something, so better you copy that locally somewhere, and link that.
Try it out and let me know.
I had experienced the exact same problem on a less-powerful notebook I had to use.
Try one of the following
Download the latest Eclipse version (It needs, just as helios, a lot of RAM and CPU because it's based on a new "architekture", in contrast to, for instance, galileo)
Make sure you are using the latest JDK and JRE
Download Eclipse Galileo, which does require pretty less resources and goes still very very fine with most projects!
It sounds like you are experiencing the features of the latest Eclipse arch. In the latest versions of Eclipse I have noticed that the more plugins and add-ons you have installed, the slower the environment runs. There are a lot of similar posts regarding performance on the new platform
I have removed all but the plugins I am using and never install anything not needed into the Eclipse environment.
I "may" have experience this. Not sure. Suddenly started working again. I was getting a hang every time I would try to debug an app, in the part of the code (inside GWT) that creates a "table" element. Could be that there is something that just takes a while and you just have to "wait it out" the when it happens. Go get a cup of coffee, type thing. anyway I HAD stepped deep into the GWT code, plenty so I'm convinced it IS a GWT issue of some kind.
I was thinking it was some infinite recursion possibly in the logging system (like logger code accidentally trying to log itself, and going into loop?). Also there's a 50/50 chance that it was simply clicking on 'run' instead of 'debug' made it start working again. So at least try that if you have problems. My gut instinct and 30yrs programming under my belt tells me it's logger related. I can rule out "slow computers" because I never had this happen until I got a new machien which is Dell XPS, Core i7, 8 GB ram, and massive disk. So I wouldn't blame hardware, or Eclipse bloat.