Sublime Text: can not download with sync-setting package due to randomly changed "ignored_packages" list - sublimetext3

I am trying to download/install some 50+ packages with "Sync Settings" package. So, I do Preferences > Packages Settings > Sync Settings > Settings - and my User file's contents are like below.
{
/**
* This token allow to plugin do:
* - Create a Gist
* - Download a Gist
* - Upload a Gist
* - Delete a Gist
*/
"access_token": "54564545454545646465456+4651465",
/**
* Gist identifier for upload your configuration
*/
"gist_id": "hd4554dsg45g5d4gjjmd54",
/**
* Download automagically the new version on ST startup
*/
"auto_upgrade": false
}
But it fails, giving me the below error pop-up
It appears a package is trying to ignore itself, causing a loop.
Please resolve by removing the offending ignored_packages setting.
And then when I navigate to Preference > Settings I see the below
{
"ignored_packages":
[
"Vintage"
]
}
I have looked through this issue, but it did not resolve my problem.
My system settings
Ubuntu - 18.04
Sublime Text - version 3.2 Build 3200

This just happened to me, but it seemed to resolve itself upon retrying. I just dismissed the warnings as they popped up and then let it finish downloading all of my packages. Then, I restarted Sublime (not sure if this was necessary) and downloaded the settings once more (not sure if this was necessary either). The second time, there were no errors.

Related

Neovim LSP: pyright server does not dynamically regognize changes in sub folders

I setup Neovim LSP using the nvim-lspconfig and the lsp-installer where I also installed the pyright server.
Without any further configuration it worked out of the box. However when I have a class in a subfolder and add a new method, pyright does not recognize this method when I want to access it in a different file. When I restart neovim, or open and close the file, pyright suddenly recognizes the newly added method.
I also tried :LspRestart with no effect.
I tried to add some settings to the pyright server:
return {
settings = {
python = {
analysis = {
autoSearchPaths = true,
diagnosticMode = "workspace",
useLibraryCodeForTypes = true,
}
}
},
}
But this also had no effect.
:LspLog also does not show anything which could point to the issue:
[START][2022-07-15 11:11:05] LSP logging initiated
[WARN][2022-07-15 11:11:09] ...lsp/handlers.lua:109 "The language server pyright triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[WARN][2022-07-15 11:11:09] ...lsp/handlers.lua:456 "stubPath typings is not a valid directory."
[WARN][2022-07-15 11:11:20] ...lsp/handlers.lua:109 "The language server pyright triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
I also could not find any setting regarding to this issue here which could solve this.
Since I am new to python, the way I import and structure classes might not be common and might be an issue which could cause this problem.
As a main entry point I have main.py in the root folder
All other source files are in a program/ folder which does not have a __init__.py
Inside program/ there are folders which each have a __init__.py file f.e. core/
core/__init__.py:
from .myClass import myClass
and in main.py I import it like this:
from subfolder.core import myClass
myClass.newMethod() # this is only recognized by lsp/pyright after the file is closed and reopen
Is the issue a bug in pyright (not likely I guess), a missing setting or my strange folder/import structure?
Can you try this: create (or modify) pyproject.toml, put it in the project root directory. Inside pyproject.toml, add the following lines:
[tool.pyright]
extraPaths = ["program/core" ,"program/directory_2", "program/directory_3"]
The idea is that you have to add the sub directories manually, which is really tedious but at least it works in my case.

Ignore flake8 warning in SublimeLinter

I have installed SublimeLinter-flake8. I would like to exclude the W191 warning when I am using SublimeLinter with flake8. I have checked the SublimeLinter docs and tried adding "--ignore W191" to my user settings file and reloaded plugins but I still get warned about the usage of tabs.
The following is my Packages/User/SublimeLinter.sublime-settings file.
// SublimeLinter Settings - User
{
"linters": {
"linter_name" : {
"args" : "--ignore W191"
}
}
}
I checked this answer on StackOverflow but I would like it to be applied from the settings file.
The linter_name has to be the specific plugin you're looking to configure (in this case flake8) -- try this:
{
"linters": {
"flake8" : {
"args" : "--ignore W191"
}
}
}
though realistically, it is probably better to configure your flake8 settings in flake8's configuration such that contributors to your project can work on your project without your specific sublimetext settings. I believe sublimetext's invocation of flake8 should be compatible with those configurations if I'm reading their code correctly
disclaimer: though I'm not sure it's super relevant here, I currently maintain flake8

opkg-cl update 2 download error

Am trying to update using opkg-cl. Getting the following errors. Does anyone know how I go about troubleshooting this?
[root#wrap /root]$ /etc/opkg/opkg_update.sh
Downloading /Packages.gz.
Downloading file:///mnt/usb/packages/Packages.gz.
Downloading https://beacon-repo.shoppertrak.com/repos/stable/Packages.gz.
Inflating https://beacon-repo.shoppertrak.com/repos/stable/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/all-remote-shoppertrak.
Downloading https://beacon-repo.shoppertrak.com/repos/base/Packages.gz.
Inflating https://beacon-repo.shoppertrak.com/repos/base/Packages.gz.
Updated list of available packages in /var/lib/opkg/lists/all-remote-base.
Collected errors:
* opkg_download: Failed to download /Packages.gz: URL using bad/illegal format or missing URL.
* copy_file: ///mnt/usb/packages/Packages.gz: No such file or directory.
* file_copy: Failed to copy file ///mnt/usb/packages/Packages.gz to /tmp/opkg-8FAiHb/update-iCH5Eo/all-local.gz.
[root#wrap /root]$ ls /mnt/usb/
[root#wrap /root]$
[root#wrap /root]$
Could you provide more information on your configuration?
Such as:
opkg version
content of your opkg feeds config file /etc/opkg/*.conf)
At first glance it looks like you have a local feed configured at file:///mnt/usb/packages/, which is lacking a Package.gz file.

stop checking for updates

In sublime terminal (ctrl + `) every minute I got annoing lines:
Checking for updates:
Sync Enabled: True
Sync Timeout: 60000
Latest Update at: Thu Jan 1 00:00:00 1970
Thread is: Thread-4
Paths: [{'path': '', 'display': ''}]
It interrupt me from debuging sublime plugins.
How to disable this Checking for updates?
I tried 2 things to disable it:
I added line "update_check": false into /Users/maks/Library/Application Support/Sublime Text 3/Packages/User/Preferences.sublime-settings:
{
"ignored_packages":
[
"JavaScript Console",
"Vintage"
],
"update_check": false
}
And restarted sublime. But nothing...
I tried to find string 60000 in all files of sublime folder: /Users/maks/Library/Application Support/Sublime Text 3
But nothing good found. Maybe 60000 ms is default value.
Update
Created function to search text in packages and installed packages:
searchInSubl()
{
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Installed\ Packages; zgrep -e $1 *.sublime-package ; cd ../Packages; grep -R -e $1 *
}
With help of it I searched by different words: "Checking for updates", "Sync Enabled", "Sync Timeout", "60000", "Latest Update at", "Thread is", "Paths". But nothing found.
Seemingly this update is internal sublime 3 option. Don't know how to disable it...
My current version of sublime text 3 is 3083. Here how the guys solved it HERE.
Text version
Go to Preferences -> Settings-User -> and paste that line of code in the end:
"update_check": false, or "update_check": false (without last comma if it's last item in the array). After that press CTRL + S (on Windows OS) to Save file or go to File -> Save
Image version
Since Sublime Text 3 packages are in zipped .sublime-package files, you'll need to use zgrep to search them:
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Installed\ Packages
zgrep -e "Checking for updates" *.sublime-package
If nothing is found, try looking in the Packages directory:
cd ../Packages
grep -R -e "Checking for updates" *
Hopefully one of these will match a package. If so, add the package to your ignored_packages setting and restart Sublime.
If neither search works, try using other fragments of the message as your search term: "Sync Enabled", "Latest Update", etc.
Good luck!
Please Note:
This is not the same issue as this one, where setting "update_check": false in your user preferences does not stop Sublime Text 3 from displaying upgrade messages when a new build is released. This particular issue was caused by a plugin constantly printing a message to Sublime's console. As the OP commented below:
using turning off and on every single plugin, target plugin found, its name: "My Snippets" in Installed Packages folder.
Two solutions, depending on what exactly you want to accomplish.
Since I am not sure - possibly my English - so I give you two solutions.
BLOCK PACKAGE FROM UPDATING
I use Sublinter as an example.
Preferences > Package Settings > Package Control > Settings – User
... and add something like this to block package:
// Packages to not auto upgrade
"auto_upgrade_ignore": [
"SublimeLinter"
],
BLOCK SUBLIME FROM UPDATING
If you want Sublime to stop updating and you do not trust in-app update blocking solutions, just nuke 'em.
On Windows (system I use) go to:
C:\Windows\System32\drivers\etc
... and open file named 'hosts'.
You may have to move this file onto desktop, edit it and move it back to original location, as Windows may not allow any changes to it - even, if you try as Administrator.
Then add to 'hosts' file this line of code:
127.0.0.1 localhost www.sublimetext.com
127.0.0.1 localhost sublimetext.com
Version with 'www' will do, as sublime sends updates from 'www.sublimetext.com' location.
Above code will prevent any connection from your machine to 'www.sublimetext.com', hence no updates anymore.
That does not apply to packages, they need option #1.

Does Firefox disable plugins that failed to initialize?

I am trying to test a Mozilla plugin (developed using FireBreath) in the form of an .so shared object file. The plugin was developed on Ubuntu, where it works fine.
I am now trying it under OpenSUSE - so I first symlinked the .so file in ~/.mozilla/plugins:
> ln -s /path/to/npXXX.so ~/.mozilla/plugins/
... and then ran Firefox (7) from command line:
> /path/to/firefox -P myprofile
...
LoadPlugin: failed to initialize shared library libXext.so [libXext.so: cannot open shared object file: No such file or directory]
LoadPlugin: failed to initialize shared library /path/to/npXXX.so [/path/to/npXXX.so: undefined symbol: gtk_widget_get_mapped]
# and the LoadPlugin messages do NOT show a second time - probably because plugin is disabled (via about:addons).
And so I thought to try different stuff to look into this - but first, I restarted Firefox, and realized that on the second run I do not get the "LoadPlugin: failed to initialize" messages anymore! Then I tried removing the plugins symlink, and restarting FF; and adding it again, and restarting FF - still no error messages!
So, this tells me that probably Firefox somehow disabled/blacklisted the plugin (but which one: libXext, npXXX or both?) , but searching (grepping) for (np)XXX in '/path/to/myprofile/blocklist.xml' returns nothing (the plugin should use a email-like id, not those number GUIDs, so I'd expect that string to show in blocklist.xml if it's there).
Does anyone know: is the default behavior of Firefox to disable/blocklist plugins, that fail to load at first? If so, is there a way to force Firefox to load them again (and spit out error messages)? If you'd also have links to where this behavior is documented, it will be much appreciated :)
Many thanks in advance for any answers,
Cheers!
Note: after I stopped seeing the error messages, I did the following:
I am trying "about:plugins": "No enabled plugins found";
then trying "about:addons", and clicking under Plugins: "You don't have any add-ons of this type installed";
This plugin is not embedded in an extension, so nothing new should be added in "about:addons" under "Extensions" - and as expected, nothing new shows there. Under Ubuntu (where all works), just by symlinking the plugin to ~/.mozilla/plugins, the above two locations/screens start showing the plugin info.
This one of the things that puzzle me - if it just showed the plugin as "disabled", maybe I would have had a chance to re-enable it again (to get a new batch of error messages) - however, "about:plugins" and "about:addons" simply show nothing - so there's nothing I can use to enable from there. Which tells me Firefox has used a different method to disable the plugin(s) - but I cannot tell what it is...
Firefox has a cache for XPCOM modules ("fastload cache"), if a module fails to load Firefox won't try again. The cache is reset automatically if an extension is installed or if the application is updated. Starting with Firefox 4 you can also use -purgecaches command line flag to discard the cache.

Resources