epsil / spotgen

Spotify Playlist Generator
https://epsil.github.io/spotgen/
Other
130 stars 26 forks source link

Spotgen Answers to Any and Every Command with "File or Directory not Found" #7

Closed edo9k closed 6 years ago

epsil commented 6 years ago

Hi edo9k.

I am not able to reproduce the problem. Could you please tell me how you installed spotgen?

edo9k commented 6 years ago

Thanks for replying. I installed it via npm install, as instructed on the github page.

Image of spotgen's weird behavior

epsil commented 6 years ago

Thanks for the clarification. And from the screenshot I gather that you are running some version of Linux (Ubuntu?), correct?

Let me run some tests on a Linux laptop I have lying around, and then I'll get back to you.

epsil commented 6 years ago

It's a problem with line endings. index.js has DOS-style line endings (CRLF), which confuses the interpreter.

edo9k commented 6 years ago

It's how persistent some problems can be. I'll try to grep/replace the line endings in this file tomorrow and I'll let you know how it goes in this thread. Thank you!

epsil commented 6 years ago

I would have pushed a fix already, but Git does some magic where the line endings are automatically translated between different conventions on different systems:

This "helpful behavior" actually makes it rather difficult to reproduce the problem. Specifically:

I'm not exactly sure what is happening here. I'll try recommitting the file and see if that makes any difference.


In the meantime, as a workaround, you can fix index.js yourself, or use the web demo for the time being.

edo9k commented 6 years ago

On the line ending problem, I tried using sed to correct the problem, and got into some file ownership problem. But I have been using the web demo, and it's working perfectly. Thanks again.

epsil commented 6 years ago

Try:

sudo vi index.js

Then, in vi:

:set ff=unix
:wq!
edo9k commented 6 years ago

Worked! Thanks a lot!

epsil commented 6 years ago

On a related note, I will also commit a fix to make the output parameter optional, so that

spotgen hardcore_softpop.txt

works just as well as

spotgen hardcore_softpop.txt output.txt

As of currently, the latter works, the former does not.

epsil commented 6 years ago

Hi!

Would you please update spotgen to the latest version and check if it works?

sudo npm uninstall -g spotgen
sudo npm install -g spotgen
edo9k commented 6 years ago

Working like a charm! Thanks a lot, man :+1: