weituotian / md_numbered_headers

sublime text3 plugin for markdown, auto insert/update/remove header numbers
Apache License 2.0
9 stars 1 forks source link

[Bug] TypeError: Can't convert 'int' object to str implicitly #5

Open Kristinita opened 6 years ago

Kristinita commented 6 years ago

1. Summary

If I restart Sublime Text:

    I get traceback in console.

2. Settings

Operating system and version: Windows 10 Enterprise LTSB 64-bit EN Sublime Text: Build 3143 Package: The latest stable version of MD_numbered_headers for Sublime Text 3

3. Steps to reproduce

I reproduce the problem in a version of Sublime Text without plugins and user settings.

I install MD_numbered_headers via Package Control → I restart Sublime Text.

4. Expected behavior

No traceback in console.

5. Actual behavior

reloading plugin Markdown Numbered Headers.example
reloading plugin Markdown Numbered Headers.test
Traceback (most recent call last):
  File "D:\Sublime Text Build 3143 x64 For Debug\sublime_plugin.py", line 109, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "D:\Sublime Text Build 3143 x64 For Debug\sublime_plugin.py", line 915, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "test in D:\Sublime Text Build 3143 x64 For Debug\Data\Installed Packages\Markdown Numbered Headers.sublime-package", line 7, in <module>
TypeError: Can't convert 'int' object to str implicitly

Thanks.

weituotian commented 6 years ago

thanks for your report. I am going to fix this problem.

weituotian commented 6 years ago

this commit may solve this problem.

you may follow this guide to install the new version

Kristinita commented 6 years ago

Status: :exclamation: Another problem

1. Data

As in first post:

Except:

2. Expected behavior

No extra output in console.

3. Actual behavior

reloading plugin Markdown Numbered Headers.example
reloading plugin Markdown Numbered Headers.test
a
---

## 1. ggggg reference(参考)
other test:
('pythontab',)
[5, 6]
asd
['d.d', 'd.d']

I think, that this output from test.py does not carry useful information for users.

Thanks.

Kristinita commented 6 years ago

Note:

@weituotian, prereleases possible install via Package Control. I add to User/Package Control.sublime-settings these lines:

"install_prereleases":
[
    "Markdown Numbered Headers"
],

Prerelease version successful install for me:

Prerelease

Thanks.