PlexPlaylistImporter icon indicating copy to clipboard operation
PlexPlaylistImporter copied to clipboard

syntax errors

Open moore-bryan opened this issue 7 years ago • 15 comments

No matter what flags I use or what I enter, the script keeps telling me the playlist name cannot be blank; it's not.

For example, "python PlexPlaylistImporter.py /media/Seagate/Music/Playlists/WIP.m3u WIP" returns the error. I'm sure it's my own stupid fault and would appreciate a nudge--or shove--in the correct direction.

moore-bryan avatar Apr 14 '17 19:04 moore-bryan

That is very strange. There is no apparent reason why that would happen.

  1. What operating system are you on?
  2. You are using python3, yes? (It shouldn't be able to even compile on python2, so answer should be yes)
  3. Add on line 48 of PlexPlaylistImporter.py (just above "#Confirm the playlist path"") print(args) and let me know what it says.

I should be able to answer quicker now that I am off a very time intensive project.

dakusan avatar Apr 18 '17 08:04 dakusan

If I don't hear anything more on this in 3 days I'll be closing it.

dakusan avatar Apr 29 '17 07:04 dakusan

Sorry, life's gotten in the way and I haven't been able to work on this. I'll post later today results.

moore-bryan avatar May 01 '17 10:05 moore-bryan

No problem at all. I'm often in the same boat. Just trying to clean things up on this project. I know you're still there so I'll leave this around for a while until you can respond properly.

dakusan avatar May 03 '17 07:05 dakusan

Still errors out...

bryan@lmde:~/PlexPlaylistImporter$ python PlexPlaylistImporter.py /media/Seagate/Music/Playlists/WIP.m3u WIP
  File "PlexPlaylistImporter.py", line 109
    print("Playlist name (Cannot be blank): ", end="")
                                                  ^
SyntaxError: invalid syntax

moore-bryan avatar Jun 03 '17 18:06 moore-bryan

Oh, haha. You are seeing source code there, not an actual error message. If I recall, that is what happens if you run through python2. It requires python3. This should fix your problem. If I don't hear in 2 days I'll close the topic.

dakusan avatar Jun 03 '17 18:06 dakusan

Silly me... forgot on Ubuntu I had to run it as "python3" and not just "python."

Complains about not being able to "guess" my Plex home dir and needing me to pass that as a third parameter.

moore-bryan avatar Jun 03 '17 18:06 moore-bryan

I can't remember if it was OSX or linux or both, but I never got the code hammered down to properly find the plex directories across all systems. There are instructions with the --help switch.

dakusan avatar Jun 03 '17 19:06 dakusan

Now, it complains about not being able to open the db file... it even tried sudo-ing, no love.

Thanks for your help; any ideas?

I was able to get it to--seemingly--run, although it complained about one of the songs in the playlist not being in the database (which it is); however, I don't see any way to make the result show up in Plex...

moore-bryan avatar Jun 04 '17 18:06 moore-bryan

Exact errors are always helpful.

dakusan avatar Jun 04 '17 19:06 dakusan

Sorry, there weren't any exact errors; the script just exited and said /media/Seagate/Music/Downward.ogg does not exist when it does.

moore-bryan avatar Jun 05 '17 11:06 moore-bryan

If you can just paste the exact output...

dakusan avatar Jun 05 '17 21:06 dakusan

File not found in DB: /media/Seagate/Music/Angels_&_Airwaves/I-Empire/06.Secret_Crowds.ogg

moore-bryan avatar Jun 07 '17 09:06 moore-bryan

I’m a GUI developer and I had been searching for months for a way to add external playlists to Plex. Finally found your utility and I added it to a custom Mp3 playlist create GUI I have been working on. I can now easily create playlists with my GUI and add them to Plex in seconds! Thanks so much for you work in this area! FYI – here’s a screenshot of the GUI. mp3playlistgui

CyberJafo avatar Mar 14 '18 11:03 CyberJafo

@CyberJafo glad you got use out of it :-D

dakusan avatar Mar 15 '18 15:03 dakusan