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

SyntaxError on initialization #6

Closed
ksere opened this issue Mar 9, 2018 · 3 comments
Closed

SyntaxError on initialization #6

ksere opened this issue Mar 9, 2018 · 3 comments

Comments

@ksere
Copy link

ksere commented Mar 9, 2018

Hi,

On a Windows10 machine i am getting this when sublime tries to load the package:

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\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 "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 915, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "set_window_title in ~\AppData\Roaming\Sublime Text 3\Installed Packages\SetWindowTitle.sublime-package", line 1
    import sublime
          ^
SyntaxError: invalid character in identifier

The package was installed using the package manager on Sublime 3.0.3143
Any ideas?

Cheers.

@gwenzek
Copy link
Owner

gwenzek commented Apr 18, 2018

I seems to have done something weird here:

60e73e3#diff-a7908ba95124deb7948b618398904c6eL1

Command line diff yields:

wzk:~/Github/SublimeSetWindowTitle@master$ git diff 3738c64 60e73e30d2 -- set_window_title.py
diff --git a/set_window_title.py b/set_window_title.py
index 4abfa1c..92bdd15 100644
--- a/set_window_title.py
+++ b/set_window_title.py
@@ -1,4 +1,4 @@
-import sublime
+<U+FEFF>import sublime
 
 import os
 import time

So uFEFF is a zero width no-break space: https://www.fileformat.info/info/unicode/char/feff/index.htm
I don't know how it smuggled in.
I'm gonna remove this.

gwenzek added a commit that referenced this issue Apr 18, 2018
@gwenzek
Copy link
Owner

gwenzek commented Apr 18, 2018

The latest release 1.3.1 should fix this issue.
Can you confirm ? I don't have a Windows machine to test it.

@ksere
Copy link
Author

ksere commented Apr 21, 2018

Yeap, working fine in 1.3.1.

Cheers!

@ksere ksere closed this as completed Apr 21, 2018
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