Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in console, does not work anymore (ModuleNotFoundError: No module named 'debug_tools') #3

Closed
themilkman opened this issue Nov 4, 2021 · 12 comments

Comments

@themilkman
Copy link

Hi @evandrocoan,

I just noticed that the plugin doesn't work for me currently and throws an error in the console:

reloading plugin RememberCommandPaletteInput.input_history
Traceback (most recent call last):
  File "/opt/sublime_text/Lib/python38/sublime_plugin.py", line 312, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.8/importlib/__init__.py", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 808, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/me/.config/sublime-text-3/Installed Packages/RememberCommandPaletteInput.sublime-package/input_history.py", line 7, in <module>
ModuleNotFoundError: No module named 'debug_tools'
reloading plugin RememberCommandPaletteInput.view_commands

Currently I am using ST 4122 on Linux.

Can you reproduce this?

Cheers and thanks for this plugin!

@evandrocoan
Copy link
Owner

Hi, It is missing my dependency debug_tools. I updated the plugin to use Python 3.8, but the default package control yet does not support dependencies for Python 3.8. It works for me because I do not use Package Control, but my own version/fork, to which I added support for Python 3.8 dependencies.

You can either install my fork of package control (https://github.com/evandrocoan/PackagesManager), or directly download this plugin into your packages directory and delete the file .python-version. This should load the plugin on Python 3.3 which the default package control supports.

@themilkman
Copy link
Author

Thanks for the explanation and recommendation!
I'll close this issue.

@evandrocoan evandrocoan pinned this issue Nov 6, 2021
@themilkman
Copy link
Author

Sorry for posting in this old issue, but now that PC 4.0 is released, I thought it should work with dependencies & 3.8. I removed my local version and used the one from PC... but now it does not seem to work correctly, the ESC aborted commands are not persisted. I tried it with a fresh ST install and it did not work either. Could you confirm this?
In case I should create a new issue, just tell me.
Thanks!

@evandrocoan
Copy link
Owner

I created an issue on wbond/package_control#1663, I also could not install it on Package Control 4.

@evandrocoan
Copy link
Owner

evandrocoan commented Feb 2, 2024

I opened a package control pull request with a fix allowing Python 3.8 usage: wbond/package_control#1664

@evandrocoan
Copy link
Owner

@themilkman I published a new version of my channel, which is now compatible with Package Control 4.0

@themilkman
Copy link
Author

Hi @evandrocoan, first of all thanks for looking into this and sorry for responding so late. Will it be possible in the future to install your plugin directly via the official PC? Currently, it still does not seem to work. Maybe I missed smth.

@evandrocoan
Copy link
Owner

This plugin is explicitly already on the official package control channel, although the official channel does not support Python 3.8 yet. So, you still need to use my special channel even for the official Package Control 4.

Can you show the contents of your Sublime Text console?

Can you check the contents of the directory Data/Cache/Package Control? You can find your Data directory by going on the menu Preferences -> Browse Packages, and going up one level, you should see the Cache directory or going to C:\Users\your-user-namne\AppData\Local\Sublime Text 3\Cache.

By seeing the Cache directory of package control, I can check whether you have the latest version of my channel.

@themilkman
Copy link
Author

I just retried it with a fresh portable ST, installing via PC logs:

Package Control: Installed library "debugtools" 3999 for Python 3.8
Package Control: Installed library "channelmanager" 3999 for Python 3.8
Package Control: Installed package "RememberCommandPaletteInput" 1.0.9

Content of Data/Cache/Package Control$ ll *:

Tue Feb 13 13:20:33 2024 -- last_run.json
Tue Feb 13 13:20:33 2024 -- merged-ca-bundle.crt

http_cache:
Tue Feb 13 13:21:05 2024 -- ../
Tue Feb 13 13:20:53 2024 -- ./
Tue Feb 13 13:20:53 2024 -- af3c96c0f3419e576449bf3a3fe3a8ac
Tue Feb 13 13:20:53 2024 -- af3c96c0f3419e576449bf3a3fe3a8ac.info
Tue Feb 13 13:20:35 2024 -- 01524fae79697630d0454ba3fabd9414
Tue Feb 13 13:20:35 2024 -- 01524fae79697630d0454ba3fabd9414.info

in the af3... file content I see (beside much other stuff)

{"author": "evandrocoan", "description": "Manages packages installed as git submodules", "issues": "https://github.com/evandrocoan/channelmanager/issues", "name": "channelmanager", "releases": [{"date": "2021-10-13 05:46:35", "platforms": ["*"], "python_versions": ["3.3", "3.8"], "sublime_text": "*", "url": "https://codeload.github.com/evandrocoan/channelmanager/zip/3999", "version": "3999"}]}
{"author": "evandrocoan", "description": "An additional concurrent file log handler for Python's standard logging package", "issues": "https://github.com/evandroforks/concurrentloghandler/issues", "name": "concurrentloghandler", "releases": [{"date": "2018-12-16 00:49:13", "platforms": ["*"], "python_versions": ["3.3", "3.8"], "sublime_text": "*", "url": "https://codeload.github.com/evandroforks/concurrentloghandler/zip/3999", "version": "3999"}]}
{"author": "evandrocoan", "description": "Alternate simplified logging support and general utilities functions", "issues": "https://github.com/evandrocoan/debugtools/issues", "name": "debugtools", "releases": [{"date": "2021-06-07 23:41:04", "platforms": ["*"], "python_versions": ["3.3", "3.8"], "sublime_text": "*", "url": "https://codeload.github.com/evandrocoan/debugtools/zip/3999", "version": "3999"}]}
{"author": "evandrocoan", "description": "Autored by Neil Fraser and others, Diff Match Patch is a high-performance library in multiple languages that manipulates plain text", "issues": "https://github.com/evandroforks/diffmatchpatch/issues", "name": "diffmatchpatch", "releases": [{"date": "2020-10-13 23:26:44", "platforms": ["*"], "python_versions": ["3.3", "3.8"], "sublime_text": "*", "url": "https://codeload.github.com/evandroforks/diffmatchpatch/zip/3999", "version": "3999"}]}
{"author": "evandrocoan", "description": "Python interface to a plantuml web service instead of having to run Java locally", "issues": "https://github.com/evandrocoan/plantumlconnection/issues", "name": "plantumlconnection", "releases": [{"date": "2020-11-21 18:25:36", "platforms": ["*"], "python_versions": ["3.3", "3.8"], "sublime_text": "*", "url": "https://codeload.github.com/evandrocoan/plantumlconnection/zip/3999", "version": "3999"}]}
{"author": "evandrocoan", "description": "An extended version of portalocker to lock files in Python using the with statement", "issues": "https://github.com/evandroforks/portalockerfile/issues", "name": "portalockerfile", "releases": [{"date": "2018-12-17 03:16:15", "platforms": ["*"], "python_versions": ["3.3", "3.8"], "sublime_text": "*", "url": "https://codeload.github.com/evandroforks/portalockerfile/zip/3999", "version": "3999"}]}
{"author": "evandrocoan", "description": "A modern parsing library for Python, implementing Earley & LALR(1) and an easy interface", "issues": "https://github.com/evandrocoan/pushdownparser/issues", "name": "pushdownparser", "releases": [{"date": "2020-10-13 23:50:04", "platforms": ["*"], "python_versions": ["3.3"], "sublime_text": "*", "url": "https://codeload.github.com/evandrocoan/pushdownparser/zip/3999", "version": "3999"}]}

Still, it does only persist successful commands.

Am I doing smth wrong?

@evandrocoan
Copy link
Owner

There is something wrong with my channel on the cache you provided:

  {
    "author": "evandrocoan",
    "description": "Alternate simplified logging support and general utilities functions",
    "issues": "https://github.com/evandrocoan/debugtools/issues",
    "name": "debugtools",
    "releases": [
      {
        "date": "2021-06-07 23:41:04",
        "platforms": [
          "*"
        ],
        "python_versions": [
          "3.3",
          "3.8"
        ],
        "sublime_text": "*",
        "url": "https://codeload.github.com/evandrocoan/debugtools/zip/3999",
        "version": "3999"
      }
    ]
  },

The correct I have in my clean install is this:

            {
                "author": [
                    "evandrocoan"
                ],
                "description": "No description available.",
                "details": "https://github.com/evandrocoan/debugtools",
                "homepage": "https://github.com/evandrocoan/debugtools",
                "issues": "https://github.com/evandrocoan/debugtools/issues",
                "load_order": "10",
                "name": "debugtools",
                "previous_names": [],
                "releases": [
                    {
                        "base": "https://github.com/evandrocoan/debugtools",
                        "date": "2024-02-01 21:33:12",
                        "git_tag": "2.6.27",
                        "platforms": "*",
                        "python_versions": [
                            "3.8"
                        ],
                        "sublime_text": ">3999",
                        "tags": true,
                        "url": "https://codeload.github.com/evandrocoan/debugtools/zip/2.6.27",
                        "version": "2024.0201.2133"
                    },
                    {
                        "date": "2021-06-07 20:41:04",
                        "platforms": "*",
                        "sublime_text": "<=3999",
                        "url": "https://codeload.github.com/evandrocoan/debugtools/zip/3999",
                        "version": "2021.0607.2041"
                    }
                ]
            },

I just installed a new, clean install and retested it. The problem is that after installing package control, you need to wait until package control updates itself to version 4.0.2 because the first version of package control installed is not the latest. Its support for Python 3.8 is not fully functional yet. After installing package control, restart Sublime Text and watch the Sublime Text console until it says Package Control was updated, and restart Sublime Text again. Then, you can add my channel to your package control settings as the first priority (to override my packages from the default channel, which does not support python 3.8 yet):

	"bootstrapped": true,
	"channels": [
		"https://raw.githubusercontent.com/evandrocoan/StudioChannel/master/channel.json",
		"https://packagecontrol.io/channel_v3.json"
	],
	"in_process_packages": [
	],

@themilkman
Copy link
Author

Thanks for your detailed response! (And again sorry for the delay)
Somehow your channel interfered with others packages I use. Would you mind adding your Package/dependencies to the official channel via an PR?

@evandrocoan
Copy link
Owner

Would you mind adding your Package/dependencies to the official channel via an PR?

They are already there. At least this one and the dependencies it uses, but there is no support for python 3.8 (which I use) with the default channel. You may try adding this channel instead of mine: https://github.com/packagecontrol/channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants