WebTools-NG / WebTools-NG

WebTools Next Generation for Plex
https://forums.plex.tv/t/598539
Mozilla Public License 2.0
708 stars 21 forks source link

[BUG] - Export Setting not Working #699

Open NJDevils28 opened 10 months ago

NJDevils28 commented 10 months ago

Describe the bug When exporting my users info to a CSV file, the data is not usable and unintelligible. When looking at the data in Notepad++ there are no Tabs When importing with Excel, all the data is in a single cell per row.

First line or heading line looks like this: User IDundefinedUser titleundefinedUser nameundefinedUser friendly nameundefinedUser email addressundefinedUser RestrictedundefinedLink to User thumbnailundefinedIs the user part of your HomeundefinedUser invite statusundefine

All subsequent lines do not contain a {TAB} between fields All field contain unknown data such as the word 'undefined' Fields are not encapsulated with Quotes Here is a sample of a line. I replaced any PII with "X's": NaNXXXXXXXXundefinedXXXXXXXXundefinedN/AundefinedXXXXX.XXXXXXX@hotmail.comundefinedNaNhttps://plex.tv/users/44d4129d9782b69d/avatar?c=1702823901undefinedNaNacceptedundefine

I am using Version 4.116.1 of PLEX

To Reproduce Steps to reproduce the behavior: I navigate to the Export Settings panel. I fill in the options like so: Select Date/Time Date Style Time Style Delimiter<-> Qualifier<> What to use<N/A> Delimiter between columns in CSV<{TAB}> Replace Return<> Replace NewLine<>

Expected behavior A viable CSV File readable in Excel

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Logs Please provide WebTools-NG logs in a zip WebTools-NG.log WebTools-NG.log

trumpy81 commented 10 months ago

Please see this article:

https://github.com/WebTools-NG/WebTools-NG/wiki/Help-%28Hints%2C-Tips-and-Videos%29#to-import-a-csv-file-so-that-the-columns-are-presented-correctly-in-microsoft-excel

Note: you may skip changing tab to | in the instructions.

Also, in WebTools-NG, go to Global Settings > Export Settings and make sure you enter 9 for tab in the Delimiter between columns in CSV (Use 9 for TAB) box. The recommended default is the pipe character |

BTW: 4.116.1 is the version of Plex/Web, NOT the version of Plex.

The following image shows the location of the Plex version, under Server (ROGStrix) > General Screenshot 2023-12-18 232638

DrWatson commented 9 months ago

I have seen this too. I have looked at the import instructions above, but that's not the issue. If I look at the raw text file, there are no field delimiters at all. I've tried pipe (|) and tab and comma and none appear in the export. The version of Plex running is Version 1.32.8.7639.

trumpy81 commented 9 months ago

@DrWatson Please provide a sample output file and your WebTools-NG logs taken just after the export please.

DrWatson commented 9 months ago

Here is what the exported file looks like (redacted of course): User IDundefinedUser titleundefinedUser nameundefinedUser friendly nameundefinedUser email addressundefinedUser RestrictedundefinedLink to User thumbnailundefinedIs the user part of your HomeundefinedUser invite statusundefine NaNXXXXXXundefinedXXXundefinedN/AundefinedXXX@XXX.XXXundefinedNaNhttps://plex.tv/users/XXXXXXXXXXXXXXXX/avatar?c=XXXXXXXXXXundefinedNaNacceptedundefine NaNXXXXXXundefinedXXXundefinedN/AundefinedXXX@XXX.XXXundefinedNaNhttps://plex.tv/users/XXXXXXXXXXXXXXXX/avatar?c=XXXXXXXXXXundefinedNaNacceptedundefine NaNXXXXXXundefinedXXXundefinedN/AundefinedXXX@XXX.XXXundefinedNaNhttps://plex.tv/users/XXXXXXXXXXXXXXXX/avatar?c=XXXXXXXXXXundefinedNaNacceptedundefine NaNXXXXXXundefinedXXXundefinedPERSONNAMEundefinedXXX@XXX.XXXundefinedNaNhttps://plex.tv/users/XXXXXXXXXXXXXXXX/avatar?c=XXXXXXXXXXundefinedNaNacceptedundefine NaNXXXXXXundefinedXXXundefinedN/AundefinedXXX@XXX.XXXundefinedNaNhttps://plex.tv/users/XXXXXXXXXXXXXXXX/avatar?c=XXXXXXXXXXundefinedNaNacceptedundefine NaNXXXXXXundefinedXXXundefinedN/AundefinedXXX@XXX.XXXundefinedNaNhttps://plex.tv/users/XXXXXXXXXXXXXXXX/avatar?c=XXXXXXXXXXundefinedNaNacceptedundefine NaNXXXXXXundefinedXXXundefinedN/AundefinedXXX@XXX.XXXundefinedNaNhttps://plex.tv/users/XXXXXXXXXXXXXXXX/avatar?c=XXXXXXXXXXundefinedNaNacceptedundefine NaNXXXXXXundefinedXXXundefinedPERSONNAMEundefinedXXX@XXX.XXXundefinedNaNhttps://plex.tv/users/XXXXXXXXXXXXXXXX/avatar?c=XXXXXXXXXXundefinedNaNacceptedundefine

Where do I find the log files...sorry new user.

DrWatson commented 9 months ago

nvm. Found them. I bumped to debug level since the regular error logging didn't reveal much. Not sure these are much better, but here you go: WebTools-NG.zip

trumpy81 commented 9 months ago

Thanks for that, but I would like to see the actual .csv file and logs captured just after the export.

DrWatson commented 9 months ago

I have to redact the csv file as I don't want my user's information out in the open. Is it okay if it's an edited csv?

trumpy81 commented 9 months ago

No, I need to see the raw file. Don't worry, I have no interest in the data the file contains, but I need to observe the raw format of the file.

I will delete the file as soon as I have downloaded it.

DrWatson commented 9 months ago

Is there another way to get you the file? I really don't want to post it here.

trumpy81 commented 9 months ago

Upload the file to Google Drive, OneDrive etc.. and post the link.

Like I said, I will delete the file/link from your post as soon as I download it.

DrWatson commented 9 months ago

Moderator: File deleted.

Let me know when you've grabbed it and I will delete the file on my end.

trumpy81 commented 9 months ago

The problem is you appear to have no Plex server associated with WebTools-NG. There are no libraries configured or showing in your logs.

You have an invalid separator showing - ColumnSep: '\t' in the Export settings.

You need to log into WebTools-NG using the same credentials you use for your Plex server/s (which you appear to have done). You also need to select a server before you enter any of the modules.

If you need any help setting up WebTools-NG then visit the Wiki or Website. See the Global Settings link in the main menu.

Wiki - https://github.com/WebTools-NG/WebTools-NG/wiki Website - https://webtools-ng.github.io/manual/

DrWatson commented 9 months ago

I set the column delimiter to "9" and it replaces it with {TAB}. image Then I run the export and then you see the result I provided. Not sure where \t is coming from, but I assumed that was a marked up value for "tab".

I have changed the configuration to be a comma and did an export again. It now puts tabs in the file now. I configure it to be a pipe, and it still puts tabs in. So when configuring tabs, it puts nothing in. When putting other things in, it puts tabs in. I can work with this work around, but there's something wrong in this area for sure.

The behaviour observed doesn't change regardless of whether a server is associated with WebTools-NG or not. I have selected the server, then hit reload, then went to the Plex.TV module and the behaviour is the same.

trumpy81 commented 9 months ago

That is because you input an actual Tab instead of using 9 as I showed you in my previous reply.

You need to remove that Tab (which is hidden) and replace it with the recommended pipe character |.

If you are unable to remove the hidden tab character go to Global Settings and click on Factory Reset.

This will close WebTools-NG and when you restart WebTools-NG you will need to reconfigure all settings.

After restoring your settings, try the export again.

DrWatson commented 9 months ago

I didn't put an actual tab in. I put a 9 in as the UI says. Just as I leave the page, it updates the value to {TAB}.

I have done a reset factory as suggested leaving all settings as default except setting the export dir:

image

The exact same export file is produced with no delimiters.

trumpy81 commented 9 months ago

May I see the output file and your logs please.

DrWatson commented 9 months ago

I have found the set of steps that cause the issue: start up factory reset start up again log in set server go to global settings then export settings set export dir click plex.tv click export for all there are no delimiters in the exported files

then: close down start up again log in set server click plex.tv click export for all delimiters are correct with pipes

There are some other issues around setting the delimiter, but this is as simple as I can make the steps for this problem.

trumpy81 commented 9 months ago

OK, I have verified your issue as stated above. I will contact Tommy and ask him to look into the issue.

Be aware though, Tommy is extremely busy with his new Plex duties, so he may not be able to attend to this issue for some time.