erkin / ponysay

Pony rewrite of cowsay.
GNU General Public License v3.0
1.22k stars 82 forks source link

'twilight' causes ponysay to bail. #240

Closed thePalindrome closed 7 years ago

thePalindrome commented 8 years ago

I currently have ponysay/fortune in my .bashrc, and I was greeted with this gem of a stacktrace:

Traceback (most recent call last):
  File "/usr/lib64/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/bin/ponysay/__main__.py", line 153, in <module>
  File "/usr/bin/ponysay/ponysay.py", line 319, in run
  File "/usr/bin/ponysay/ponysay.py", line 948, in print_pony
  File "/usr/bin/ponysay/backend.py", line 84, in parse
  File "/usr/bin/ponysay/backend.py", line 210, in __loadFile
IsADirectoryError: [Errno 21] Is a directory: 'twilight'

I don't seem to have a "twilight" directory inside /usr/share/ponysay/ponies, and I can't seem to figure out what is really going on!

Any further information you need, just ask!

JotaRandom commented 8 years ago

twilight is a pony (more exactly a ponyfile)... so I ask What command do you run to get that output with Twilight?

thePalindrome commented 8 years ago

Just ponysay

On August 13, 2016 6:19:43 PM MDT, " Pablo Lezaeta Reyes [pˈaβ̞lo lˌe̞θaˈeta rˈejɛ]" notifications@github.com wrote:

twilight is a pony (more exactly a ponyfile)... so I ask What command do you run to get that output with Twilight?

You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/erkin/ponysay/issues/240#issuecomment-239648792

Sent from my Android device with K-9 Mail. Please excuse my brevity.

JotaRandom commented 8 years ago

Well by default ponysay without command show the help so I dubt you just used ponysay alone, BUT I can se how you can get twilight as a directory instead of a ponyfile.

try reclone and reinstall ponysay, is possible that during either the build process or during the cloning something went wrong and lead to twilight as a direcotry instead of a proper file.

also ponyfiles are just plain text with an extension wtr.

thePalindrome commented 8 years ago

Ah, I figured it out.

Firstly, the command being used is fortune -c | ponysay

The issue is that it's using the "twilight" directory in my home folder, as opposed to /usr/share/ponysay/ponies/twilight.pony

It works perfectly fine if I cd to another directory.

to summarize: If a directory inside the current directory matches the name of a pony ponysay bails.

JotaRandom commented 7 years ago

since is fixed close, this is cover a s a proper bug in #246