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

Siblime Figlet options missing (Windows 7) #7

Closed
r5w opened this issue May 25, 2014 · 26 comments
Closed

Siblime Figlet options missing (Windows 7) #7

r5w opened this issue May 25, 2014 · 26 comments

Comments

@r5w
Copy link

r5w commented May 25, 2014

Installation via Package Control on Windows 7, appears to work fine - but the Add Text options have not appeared under the Tools option.

Restarting ST3 made no difference.
Removing package and reinstalling via Package Control and restarting ST3 has also made no difference.

Have not been able to test this on Linux yet.

@Twizzledrizzle
Copy link

Same here!

@lunelson
Copy link

Same problem on ST3 Mac OS X. No options appear even after restarting

@wabisabit
Copy link

Same issue on ST3, Ubuntu 14.04 x64

Console log:

reloading plugin Figlet Big ASCII Text.figlet
Traceback (most recent call last):
File "figlet in /home/roman/.config/sublime-text-3/Installed Packages/Figlet Big ASCII Text.sublime-package", line 8, in
ImportError: cannot import name pyfiglet

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/sublime_text/sublime_plugin.py", line 73, in reload_plugin
m = importlib.import_module(modulename)
File "X/importlib/init.py", line 88, in import_module
File "", line 1577, in _gcd_import
File "", line 1558, in _find_and_load
File "", line 1525, in _find_and_load_unlocked
File "/opt/sublime_text/sublime_plugin.py", line 671, in load_module
exec(compile(source, source_path, 'exec'), mod.dict)
File "figlet in /home/roman/.config/sublime-text-3/Installed Packages/Figlet Big ASCII Text.sublime-package", line 13, in
ImportError: No module named 'pyfiglet'

@docsteveharris
Copy link

Same here on ST3 Build 3059 Mac OS X 10.9.3.
Re-installed and re-started with no luck.

@erwanlescop
Copy link

This plugin does not work with ST3 (Windows 8.1, though I doubt it matters).

ST3 console start log:

reloading plugin Figlet Big ASCII Text.figlet
Traceback (most recent call last):
  File "figlet in C:\Users\sony vaio\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package", line 8, in <module>
ImportError: cannot import name pyfiglet

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files (x86)\Sublime Text 3\sublime_plugin.py", line 73, in reload_plugin
    m = importlib.import_module(modulename)
  File "X/importlib/__init__.py", line 88, in import_module
  File "<frozen importlib._bootstrap>", line 1577, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1558, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1525, in _find_and_load_unlocked
  File "C:\Program Files (x86)\Sublime Text 3\sublime_plugin.py", line 671, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "figlet in C:\Users\sony vaio\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package", line 13, in <module>
ImportError: No module named 'pyfiglet'

@adamchainz
Copy link
Owner

Thanks for the reports. I suspect it is something to do with the bundling into a .sublime-package zip file, since my git-based install on ST3 is working. I'll have a dig around later. Any more stacktraces from the console for other OSes as @erwanlescop posted would be useful!

@vanishing
Copy link

tested git with newest sublime, same error.
ubuntu 14.10(not out yet).

@adamchainz
Copy link
Owner

Hi guys,

I've improved the import behaviour for ST2 and 3. Also turns out one of the dependencies, pkg_resources, was being included here by another plugin, which could've meant "it works for me" would crop up.

Retries now with latest master are invited!

@r5w
Copy link
Author

r5w commented May 29, 2014

Hi Adam

I've just tried this (this time its ST2 on Linux (Linux Mint 15)).

The Figlet:Add Text and Figlet: Select Font commands are appearing in the Command Palette now but nothing happens when I try to Add Text after typing some text in the panel.

Here is the log
Traceback (most recent call last):
File "./sublime_plugin.py", line 356, in run_
File "./figlet.py", line 79, in run
File "./figlet.py", line 12, in figlet_text
File "/home/rob/.config/sublime-text-2/Packages/Figlet Big ASCII Text/lib/pyfiglet/init.py", line 8, in
import pkg_resources
File "/home/rob/.config/sublime-text-2/Packages/Figlet Big ASCII Text/lib/pkg_resources.py", line 702, in
class Environment(object):
File "/home/rob/.config/sublime-text-2/Packages/Figlet Big ASCII Text/lib/pkg_resources.py", line 705, in Environment
def init(self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR):
File "/home/rob/.config/sublime-text-2/Packages/Figlet Big ASCII Text/lib/pkg_resources.py", line 140, in get_supported_platform
plat = get_build_platform()
File "/home/rob/.config/sublime-text-2/Packages/Figlet Big ASCII Text/lib/pkg_resources.py", line 264, in get_build_platform
from distutils.util import get_platform
ImportError: No module named distutils.util

Also if I try to choose a font nothing happens at all, but I'm guessing that I'm missing something here anyhow - there aren't any fonts as such installed with the plugin are there? Should I be installing those separately?

Just for completeness here is the log when I try to use the Figlet: Select Font option

Traceback (most recent call last):
File "./sublime_plugin.py", line 339, in run_
File "./figlet.py", line 42, in run
File "/home/rob/.config/sublime-text-2/Packages/Figlet Big ASCII Text/lib/pyfiglet/init.py", line 8, in
import pkg_resources
File "/home/rob/.config/sublime-text-2/Packages/Figlet Big ASCII Text/lib/pkg_resources.py", line 702, in
class Environment(object):
File "/home/rob/.config/sublime-text-2/Packages/Figlet Big ASCII Text/lib/pkg_resources.py", line 705, in Environment
def init(self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR):
File "/home/rob/.config/sublime-text-2/Packages/Figlet Big ASCII Text/lib/pkg_resources.py", line 140, in get_supported_platform
plat = get_build_platform()
File "/home/rob/.config/sublime-text-2/Packages/Figlet Big ASCII Text/lib/pkg_resources.py", line 264, in get_build_platform
from distutils.util import get_platform
ImportError: No module named distutils.util

Thanks Rob

@erwanlescop
Copy link

@adamchainz: solved for me, ST3 - Windows 8.1 👍

  • Package Control: remove and reinstall SublimeFiglet
  • ST3 restart; console log OK:
startup, version: 3059 windows x32 channel: stable
(...)
reloading plugin Figlet Big ASCII Text.figlet
(...)
plugins loaded

Hence:

  • Figlet: Select Font available in command palette; command updates Sublime Text user settings: "figlet_font": "(...)"
  • Figlet: Add Text available in command palette; command works as intended (Text to Figletize:)

@adamchainz
Copy link
Owner

@erwanlescop good to hear.

@r5w It looks like ST2 doesn't come with distutils by default either. I'll probably end up modifying the pyfiglet copy tonight so it doesn't rely on pkg_resources and thus distutils.

@lunelson
Copy link

Working here—OS X, ST3


        88                                 88                  88
  ,d    88                                 88                  88
  88    88                                 88                  88
MM88MMM 88,dPPYba,  ,adPPYYba, 8b,dPPYba,  88   ,d8  ,adPPYba, 88
  88    88P'    "8a ""     `Y8 88P'   `"8a 88 ,a8"   I8[    "" 88
  88    88       88 ,adPPPPP88 88       88 8888[      `"Y8ba,  ""
  88,   88       88 88,    ,88 88       88 88`"Yba,  aa    ]8I aa
  "Y888 88       88 `"8bbdP"Y8 88       88 88   `Y8a `"YbbdP"' 88

@adamchainz
Copy link
Owner

Just finished removing the dependence on pkg_resources - anyone still having problems uninstall/reninstall and try again. Should work.

@lunelson
Copy link

lunelson commented Jun 1, 2014

Uh oh, now it's not working. With the updated package I get the "add text" and "choose font" options but nothing happens when I choose them. Again, OS X / ST3

@erwanlescop
Copy link

@adamchainz Same here, not working again (Windows 8.1 / ST3) with your last update.

  • Figlet: Select Font available but does not work. Log:
Traceback (most recent call last):
  File "C:\Program Files (x86)\Sublime Text 3\sublime_plugin.py", line 526, in run_
    return self.run()
  File "figlet in C:\Users\sony vaio\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package", line 43, in run
  File "C:\Users\sony vaio\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package\pyfiglet\__init__.py", line 105, in getFonts
FileNotFoundError: [WinError 3] Le chemin d’accès spécifié est introuvable: 'C:\\Users\\sony vaio\\AppData\\Roaming\\Sublime Text 3\\Installed Packages\\Figlet Big ASCII Text.sublime-package\\pyfiglet\\fonts\\*.*'
  • Figlet: Add Text available but does not work. Log:
Traceback (most recent call last):
  File "C:\Program Files (x86)\Sublime Text 3\sublime_plugin.py", line 543, in run_
    return self.run(edit, **args)
  File "figlet in C:\Users\sony vaio\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package", line 79, in run
  File "figlet in C:\Users\sony vaio\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package", line 18, in figlet_text
  File "C:\Users\sony vaio\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package\pyfiglet\__init__.py", line 457, in __init__
  File "C:\Users\sony vaio\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package\pyfiglet\__init__.py", line 464, in setFont
  File "C:\Users\sony vaio\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package\pyfiglet\__init__.py", line 84, in __init__
  File "C:\Users\sony vaio\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package\pyfiglet\__init__.py", line 99, in preloadFont
pyfiglet.FontNotFound: banner

@Twizzledrizzle
Copy link

Same problem here, by the way, how do you get those logs @erwanlescop ?

@r5w
Copy link
Author

r5w commented Jun 2, 2014

@adamchainz
I've just gone back to Windows 7 and

  • removed old Sublime Figlet package
  • reinstalled latest version
  • closed ST3 and restarted it

But I'm having the same response as @erwanlescop

Tried to Add Text and nothing happened.
Log reads..

File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 543, in run_
    return self.run(edit, **args)
  File "figlet in C:\Users\Rob\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package", line 79, in run
  File "figlet in C:\Users\Rob\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package", line 18, in figlet_text
  File "C:\Users\Rob\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package\pyfiglet\__init__.py", line 457, in __init__
  File "C:\Users\Rob\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package\pyfiglet\__init__.py", line 464, in setFont
  File "C:\Users\Rob\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package\pyfiglet\__init__.py", line 84, in __init__
  File "C:\Users\Rob\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package\pyfiglet\__init__.py", line 99, in preloadFont
pyfiglet.FontNotFound: standard

Tried to Select Font and log reads as...

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 526, in run_
    return self.run()
  File "figlet in C:\Users\Rob\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package", line 43, in run
  File "C:\Users\Rob\AppData\Roaming\Sublime Text 3\Installed Packages\Figlet Big ASCII Text.sublime-package\pyfiglet\__init__.py", line 105, in getFonts
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\Rob\\AppData\\Roaming\\Sublime Text 3\\Installed Packages\\Figlet Big ASCII Text.sublime-package\\pyfiglet\\fonts\\*.*'

@Twizzledrizzle You can view the log (at least on Windows you can) by hitting Ctrl and ' (which on my keyboard is the @ symbol.

@adamchainz
Copy link
Owner

Okay guys. Thanks for the errors. This is a bit more complicated than I thought to begin with! There are actually quite a few running environments to try and keep everything running under:

  1. It must work in ST2 and 3
  2. ...therefore it must work in both Python 2 and 3
  3. It must also work both in and out of a .sublime-package (a zipfile) as introduced in ST3
  4. The usual Mac OS/Windows/Linux trifecta.

Until now I've mostly been testing it as a normal folder, instead of the .sublime-package because these are normally automatically made by package control - looks like this is the major breakage now, so I'll try revive it for this case, without breaking any of the others...

@adamchainz
Copy link
Owner

Also, I can't find any good examples of other plugins successfully using data files in all cases - if you know any, please say!

@func0der
Copy link

As long as @adamchainz is working on this problem here is a temporary work around, which should work on every machine, but is only tested on windows.

  1. Go to your package folder: Preferences -> Browse Packages...

  2. After it opened in your Finder, Explorer, whatever, close Sublime.

  3. Browse up in the package folder and go into Installed Packages.

  4. Rename the file Figlet Big ASCII Text.sublime-package to Figlet Big ASCII Text.zip and extract its content to a folder called Figlet Big ASCII Text.

  5. Delete the Figlet Big ASCII Text.zip file.

  6. Move the Figlet Big ASCII Text folder to the folder Packages where you originally started browsing. If you browse up from the Installed Packages folder you should see it.

    On windows it should look like this now: C:\Users[YOUR USER]\AppData\Roaming\Sublime Text 3\Packages\Figlet Big ASCII Text

  7. Start sublime and test settings the font. It should work.

Alternatively you could just create the folder in "Packages" and clone the git repository in there. But since not everybody is able to do so (can you believe it? there are still SVN guys out there), I decided to write about this way.

I hope that helps you guys ;)

Regards
func0der

@adamchainz
Copy link
Owner

Thanks @func0der . Alternative to get the zip as well is to skip Package Control altogether, and download it with the "Download Zip" button on the front page on Github (https://github.com/adamchainz/SublimeFiglet).

@func0der
Copy link

Yeah, that of course xD Forgot about that one.

@benje
Copy link

benje commented Aug 3, 2014

Thanks for the fix - very useful plugin 👍

@adamchainz
Copy link
Owner

Hi guys,

I've just done my dev update session. I discovered the .no-sublime-package option for package control which means that when you install it from package control it is not zipped up, resolving most of my problems with font loading. Therefore, please try now installing from package control. I've just run it successfully this way on ST2 and ST3 :)

Thanks,

Adam

@Twizzledrizzle
Copy link

Works great with ST3! Thanks!
-- 
Niklas

On 3 Aug 2014 at 22:27:07, Adam Chainz (notifications@github.com) wrote:

Hi guys,

I've just done my dev update session. I discovered the .no-sublime-package option for package control which means that when you install it from package control it is not zipped up, resolving most of my problems with font loading. Therefore, please try now installing from package control. I've just run it successfully this way on ST2 and ST3 :)

Thanks,

Adam


Reply to this email directly or view it on GitHub.

@adamchainz
Copy link
Owner

As no one else as commented, and it's working for me, I'm closing the issue.

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

10 participants