-
Notifications
You must be signed in to change notification settings - Fork 31
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
Unable to create XML according to the selected groups #1
Comments
Hi there thanks for the feedback. I've not seen this problem with my uses so I'll run some tests..I expect this could be related to the data returned for those groups that you're keeping. I'll get back to you. |
I've had no luck reproducing the problem that you're seeing here yet. However one thing I do notice is that you're a windows user and in your command line, you've specified the path to the python script like this:
..and I'm not sure this is correct for windows because ./ at the start of m3u-epg-editor.py basically means: use the current folder in linux. Please try something like this instead to see if it helps:
|
Another thing that I noticed in your command line is that this doesn't look like the correct url to the vaderstreams epg file: |
@jjssoftware Thanks for getting back to me - regarding the line This will create some files
But then will fail to create here are the full output details `C:\Python27\python.exe C:\Users\Carlos\Documents\tools\m3u-epg-editor\m3u-epg-editor.py -m="http://api.vaders.tv/vget?username=username&password=password&format=ts" --epgurl="http://vaders.tv/p2.xml.gz" -g="'sports'" --outdirectory="C:\Users\Carlos\Documents\Plex-Scripts\development\telly\tests" -f="C:\Users\Carlos\Documents\Plex-Scripts\development\telly\tests\Sports_unsorted" File "C:\Users\Carlos\Documents\tools\m3u-epg-editor\m3u-epg-editor.py", line 434, in Hope this gives you a better look Thanks Again, |
Thank you for that but we're not there yet. I can see the line of Python where it throws the exception / goes wrong but no test that I've performed so far has been able to reproduce this problem and nothing said so far has given any clues to what is causing this. I do have Windows 7 running in a virtual machine, I'm running this in a regular powershell 5.1 window and it's working ok there. I've emulated / recreated your folder structure to rule out path length related issues as the cause. Are you running Windows 10? Are you running this in a regular powershell window? If you're in a powershell window, what does this return: This is what mine returns:
Do you have any special regional or language settings configured in Windows? Are you a docker user? If this is being run in powershell I suspect that this could be unicode / non-unicode related but before I start making changes and ask you test those candidate changes I'd appreciate it if you could answer the questions above. Please also add anything else you can think of that might be a bit non-standard about your setup. If you are running this in powershell then I guess you could try running this in a regular command prompt (if possible?) to narrow this down to something in powershell as the cause. |
OK getting closer now. Going on a hunch that you are running Windows 10 and also executing this script in a powershell window, I grabbed a copy of a Windows 10 virtual machine and I've now managed to reproduce this issue. My steps to reproduce this are a little non-standard but it does reliably reproduce the problem exactly as you've described:
At step 3, I note that sometimes the script will immediately fail with I have also been able to reproduce this problem following the same steps using a regular command prompt window instead of powershell. I'm not sure if this is how you cause this problem to occur or if something else is triggering this for you. The good news however is that it's now reliably reproducible here so I should be able to come up with a fix for this. |
This appears to be a Windows 10 bug documented here, currently in the process of being fixed but is not yet released. I'll try and come up with some way of elegantly handling this issue in the meantime so that it doesn't cause the python script to fail. |
Please see the fix commit applied here: 9a801b4 I've tested this in Windows 10 in both powershell and a regular command prompt and it has fixed this issue for how I was reproducing it. Please give this a test and let me know if it improves things for you. |
@jjssoftware Thanks for your prompt reply on this bug and also my apologies for the delay to reply (Really busy this days at work)... btw you might think of a discord chat will be more straight forward for replies :)/ |
No problem @haxcop there's no rush, thanks for testing it when you have time. So far as discord / slack / other comms tools go, I have no interest in this sort of thing for my own github projects. I'm sure that issue comments are good enough for the stuff that I work on in here; there's just no need for anything more real-time / engaging. |
HI @jjssoftware the problem remains when it comes to sort the xml file
So here's my enviroment details:
|
@jjssoftware Sorry - for some reasson is not working on my Powershell into vs code but i just tried on Native powershell window and didn't gave me any error. Thanks!. |
Yes this does sound very much like the Windows 10 bug that I linked to above. Lots of users are reporting issues with the vs code shell in that vs code issue It sounds like you might have it working isolated in a powershell window rather than vs code however I must say that the line numbers that you've included in your last comment look off. I strongly suspect you're not running the right version which includes the fix that I asked you to test. If that's the case I'm not surprised you're still seeing this problem. |
Can you confirm that you're testing the patched script or should I just go ahead and merge the candidate fix into the master branch? |
@jjssoftware will do tomorrow thanks |
@jjssoftware works as it should. very nice work thanks!. go ahead and merge |
Hi, I have been using the python script and it looks really nice, thanks for your work.
anyway. there;s an issue on it that is unable to properly sort the xml when it comes by groups, at least is what i have test it so far.
here;s the error
2Traceback (most recent call last): File "./m3u-epg-editor.py", line 434, in <module> main() File "./m3u-epg-editor.py", line 100, in main xml_tree = create_new_epg(args, epg_filename, m3u_entries) File "./m3u-epg-editor.py", line 375, in create_new_epg output_str("creating channel element for {}".format(channel_id)) File "./m3u-epg-editor.py", line 160, in output_str print("%s %s" % (datetime.datetime.now().isoformat(), event_str)) IOError: [Errno 0] Error
my line goes something like this with Vaders
C:\Python27\python.exe ./m3u-epg-editor.py -m="http://api.vaders.tv/vget?username=username&password=password&format=ts" -e="http://vaders.tv/.xml.gz" -g="'sports','latino','spain','ireland','united kingdom','united states'" -d="C:\Users\Carlos\Documents\Plex-Scripts\m3u_epg_optimizer\m3u-epg-editor" -f="test"
Hope this help you to help US :)
Thanks
The text was updated successfully, but these errors were encountered: