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

InsertDate suddenly stopped working #24

Closed
RonJeffries opened this issue Aug 21, 2015 · 17 comments
Closed

InsertDate suddenly stopped working #24

RonJeffries opened this issue Aug 21, 2015 · 17 comments
Labels

Comments

@RonJeffries
Copy link

Today when I started Sublime, InsertDate has stopped working. The console log shows that the key strokes are generating the right calls, insert_date_panel and so on. None of them do anything: the panel never shows up, the prompt window never opens, and the ones with default formats do not insert anything.

I removed InsertDate and installed it with no change. I was getting log errors from ruby and rubytest and have disabled those, so now my python console is clean. It's just that nothing happens.

I hope you'll get this and have some advice. Thanks!

@FichteFoll
Copy link
Owner

Could you post your entire console log after trying to call one or multiple insert date commands?

@FichteFoll FichteFoll added the bug label Aug 21, 2015
@RonJeffries
Copy link
Author

Thanks. I turned on log commands. As you can see, there are no messages. Nothing happened elsewhere: the panel didn't open, the prompt line didn't open, nothing got inserted.

loaded 1104 snippets
Package Control: Skipping automatic upgrade, last run at 2015-08-21 09:31:08, next run at 2015-08-21 10:31:08 or after
Traceback (most recent call last):
File "./sublime_plugin.py", line 195, in on_modified
File "./sublime_plugin.py", line 154, in run_timed_function
File "./sublime_plugin.py", line 194, in
File "./distraction_free_mode.py", line 23, in on_modified
File "./distraction_free_mode.py", line 12, in on_distraction_free
AttributeError: 'Window' object has no attribute 'settings'

// i started inserting dates here:

sublime.log_commands(True)
command: drag_select {"event": {"button": 1, "x": 404.8046875, "y": 287.5546875}}
command: insert_date
no command for selector: noop:

// oops, typed bad sequence, so I looked up the good ones:

command: show_overlay {"overlay": "command_palette"}
command: open_file {"file": "${packages}/InsertDate/Default ($platform).sublime-keymap"}
command: drag_select {"event": {"button": 1, "x": 271.87890625, "y": 669.8515625}}

// nothing happened when I typed these:

command: insert_date_prompt
command: insert_date_panel
command: insert_date

// preparing to copy console

command: drag_select {"event": {"button": 1, "x": 269.0390625, "y": 628.27734375}}

@FichteFoll
Copy link
Owner

What about the part before loaded 1104 snippets?

@RonJeffries
Copy link
Author

That's the first line in the console log when I open it after starting Sublime fresh.

@RonJeffries
Copy link
Author

If I start it fresh and quickly hit control tick, log contains this:

theme loaded
app ready
pre session restore time: 0.973687
using gamma: 2 (err: 6.9282)
Loading dictionary Packages/Language - English/en_US.dic
Traceback (most recent call last):
File "./sublime_plugin.py", line 195, in on_modified
File "./sublime_plugin.py", line 154, in run_timed_function
File "./sublime_plugin.py", line 194, in
File "./distraction_free_mode.py", line 23, in on_modified
File "./distraction_free_mode.py", line 12, in on_distraction_free
AttributeError: 'Window' object has no attribute 'settings'
startup cache, total files: 125 cache hits: 125
startup time: 1.38423 (package setup was not run)
loaded 1104 snippets
Package Control: No updated packages

I'll see if I can catch more by being faster. Log isn't open on restart ...

@RonJeffries
Copy link
Author

Got this:

theme loaded
app ready
pre session restore time: 0.853512
using gamma: 2 (err: 6.9282)
Loading dictionary Packages/Language - English/en_US.dic
Traceback (most recent call last):
File "./sublime_plugin.py", line 195, in on_modified
File "./sublime_plugin.py", line 154, in run_timed_function
File "./sublime_plugin.py", line 194, in
File "./distraction_free_mode.py", line 23, in on_modified
File "./distraction_free_mode.py", line 12, in on_distraction_free
AttributeError: 'Window' object has no attribute 'settings'
startup cache, total files: 125 cache hits: 125
startup time: 1.26157 (package setup was not run)
loaded 1104 snippets
Package Control: Skipping automatic upgrade, last run at 2015-08-21 10:31:51, next run at 2015-08-21 11:31:51 or after

@RonJeffries
Copy link
Author

I appreciate your looking at this: it's almost certainly not your problem, but I'm hoping you can spot what's happening. I haven't changed any package control stuff in ages, other than removing rspect and ruby after this started happening, to see if that would help.

@FichteFoll
Copy link
Owner

Do you perhaps have multiple Sublime Text windows? If yes, check all of them since newer windows do not percieve the old console log.
There are many lines missing.

Also, it most likely is my fault because I pushed an update this morning that I honestly did not test thouroughly on ST2, for example.

@RonJeffries
Copy link
Author

Ah. In fact I had a million windows hiding away somewhere. Doing it again really clean:

Still a very empty console ...

sublime.log_commands(True)
command: drag_select {"event": {"button": 1, "x": 300.2265625, "y": 83.078125}}
command: insert_date
command: insert_date
command: drag_select {"event": {"button": 1, "x": 236.90625, "y": 624.578125}}
command: drag_select {"event": {"button": 1, "x": 806.765625, "y": 638.046875}}

@RonJeffries
Copy link
Author

misunderstood instructions about checking old windows, sorry. anyway the above is a clean start from no windows.

@FichteFoll
Copy link
Owner

I found a bug (2 actually) while testing the most recent release on my ST2 version. You most likely ran into that, although the lack of a proper console print is weird. I could clearly see a traceback of where the exception occured, also coupled with many other debug lines that every ST version prints on every start.

Edit: It should look like this:

startup, version: 2221 windows x64 channel: stable
executable: /C/tools/Sublime Text 2/sublime_text.exe
working dir: /C/tools/Sublime Text 2
packages path: /C/tools/Sublime Text 2/Data/Packages
settings path: /C/tools/Sublime Text 2/Data/Settings
PackageSetup not required
Py_GetProgramName(): sublime_text.exe
Py_GetExecPrefix(): C:\tools\Sublime Text 2
Py_GetProgramFullPath(): C:\tools\Sublime Text 2\sublime_text.exe
Py_GetPath(): C:\tools\Sublime Text 2\python26.zip;C:\tools\Sublime Text 2\DLLs;C:\tools\Sublime Text 2\lib;C:\tools\Sublime Text 2\lib\plat-win;C:\tools\Sublime Text 2\lib\lib-tk;C:\tools\Sublime Text 2
Py_GetPythonHome(): C:\tools\Sublime Text 2
catalogue loaded
found 13 files for base name Default.sublime-keymap
found 1 files for base name Default.sublime-mousemap
found 12 files for base name Main.sublime-menu
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\0_package_control_loader\00-package_control.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\0_package_control_loader\01-ssl-windows.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\0_package_control_loader\02-bz2.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\0_package_control_loader\02-select-windows.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\0_package_control_loader\50-pytz.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\0_package_control_loader\50-requests.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\AAAPackageDev\AAA.py
[AAAPackageDev] Added C:\tools\Sublime Text 2\Data\Packages\AAAPackageDev\Lib to sys.path.
[AAAPackageDev] Added C:\tools\Sublime Text 2\Data\Packages\AAAPackageDev\Lib\_py2 to sys.path.
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\AAAPackageDev\build_sys_dev.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\AAAPackageDev\commands_file_dev.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\AAAPackageDev\completions_dev.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\AAAPackageDev\file_conversion.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\AAAPackageDev\scope_data.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\AAAPackageDev\settings_dev.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\AAAPackageDev\snippet_dev.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\AAAPackageDev\sublime_inspect.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\AAAPackageDev\syntax_def_dev.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\BracketHighlighter\bh_core.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\BracketHighlighter\bh_logging.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\BracketHighlighter\bh_plugin.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\BracketHighlighter\bh_regions.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\BracketHighlighter\bh_remove.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\BracketHighlighter\bh_rules.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\BracketHighlighter\bh_search.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\BracketHighlighter\bh_swapping.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\BracketHighlighter\bh_wrapping.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\BracketHighlighter\ure.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\BufferScroll\BufferScroll.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\ChannelRepositoryTools\ordereddict.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\ChannelRepositoryTools\tests.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\ChannelRepositoryTools\upgrade.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\comment.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\copy_path.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\delete_word.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\detect_indentation.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\duplicate_line.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\echo.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\exec.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\fold.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\font.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\goto_line.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\indentation.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\kill_ring.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\mark.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\new_templates.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\open_file_settings.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\open_in_browser.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\paragraph.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\save_on_focus_lost.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\scroll.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\set_unsaved_view_name.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\side_bar.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\sort.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\swap_line.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\switch_file.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\transform.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\transpose.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Default\trim_trailing_white_space.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Diff\diff.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\File History\file_history.py
[FileHistory] Reloading the settings file "FileHistory.sublime-settings".
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\HTML\encode_html_entities.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\HTML\html_completions.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\InactivePanes\inactive_panes.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Insert Nums\InsertNums.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\InsertDate\insert_date.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\InsertNums\InsertNums.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Open-Include\Edit.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Open-Include\open_env.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Open-Include\open_include.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Package Control\Package Control.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Package Control\bootstrap.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\QuickRulers\quick_rulers.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\RequestsTest\just_a_test.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\To Hastebin\ToHasteBin.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\User\cycle_groups.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\User\quick_rulers.py
Reloading plugin C:\tools\Sublime Text 2\Data\Packages\Wrap Plus\wrap_plus.py
plugin init time: 0.759346
loading bindings
loading pointer bindings
found 1 files for base name Soda Dark.sublime-theme
theme loaded
app ready
pre session restore time: 2.0302
wrote startup cache, added files: 9 orphaned files: 1 total files: 240 cache hits: 231
startup time: 2.10397 (package setup was not run)
loaded 865 snippets
found 1 files for base name Soda Dark.sublime-theme
theme loaded
Package Control: No updated packages

and the traceback would have been somewhere in that, after Reloading plugin ...InsertDate/insert_date.py

@RonJeffries
Copy link
Author

ah. perhaps i'm using console wrong. it doesn't auto open when i start ST. anyway maybe you've found the issue. please let me know if/when you push an update.

relatedly: what are your thoughts on going to ST3? I've been holding off from fear of a difficult upgrade.

@FichteFoll
Copy link
Owner

It never auto opens, but one window must contain the above snippet, you just need to crawl all of them to see which window opened first.

Update pushed via 1543700, should be available on package control in <1h.

I recommend everyone to use ST3, no excuses. It's just so much better.

Also, thanks for the report. I should stop being lazy and test my releases on ST2 before pushing them, if I claim to support it. This isn't the first time this has happened.

@RonJeffries
Copy link
Author

Thanks. I mistakenly closed them. Sounds like you found it anyway.
Also thanks for your thoughts on ST3. I suppose I have to buckle down and get it. Just concerned about getting it configured to my liking again. I have no idea what all I've done.

Thanks again!

@FichteFoll
Copy link
Owner

If you copy over the User folder you should be good 99% of the time. Unless you developed your own packages, everything should have been placed in the User folder.

Package Control will automatically download the packages you had installed because that is saved in User/Package Control.sublime-settings.

@RonJeffries
Copy link
Author

Ah, didn't know that. I'll give it a go soon. Thanks!

@RonJeffries
Copy link
Author

works, thanks!

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

No branches or pull requests

2 participants