[64-bit] subprocess.Popen raises error

Hi!

I was testing my addon on the latest Kodi 18 alpha. It works with Kodi 32-bit, but I have a problem with 64-bit version when I want to run an external program using subprocess.Popen (tested on 64-bit Windows 8). In default.py file in the 35th line subprocess.Popen('ping google.com', shell=True, stdout=subprocess.PIPE) raises an error.

I have narrowed the code to the following small default.py:

Code:
# -*- coding: utf-8 -*-

import subprocess
import xbmc

if __name__ == '__main__':
    xbmc.log("----- Begin ----- ", level=xbmc.LOGERROR)
    result = subprocess.Popen('ping -n 3 google.com', shell=True, stdout=subprocess.PIPE).stdout.read()
    xbmc.log(str(result),          level=xbmc.LOGERROR)
    xbmc.log("------ End ------ ", level=xbmc.LOGERROR)

that raises this error when Kodi is run by a normal user:

Code:
EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.OSError'>
Error Contents: (13, 'Permission denied')
Traceback (most recent call last):
  File "C:\Users\iwis\AppData\Roaming\Kodi\addons\script.service.ping-addon\default.py", line 9, in <module>
    result = subprocess.Popen('ping -n 3 google.com', shell=True, stdout=subprocess.PIPE).stdout.read()
  File "C:\Program Files\Kodi\system\python\Lib\subprocess.py", line 420, in __init__
    self.stdout = os.fdopen(c2pread, 'rb', bufsize)
OSError: (13, 'Permission denied')
-->End of Python script error report<--

or this error when Kodi is run by an administrator:

Code:
EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.OSError'>
Error Contents: (2, 'No such file or directory')
Traceback (most recent call last):
  File "C:\Users\admin1\AppData\Roaming\Kodi\addons\script.service.ping-addon\default.py", line 9, in <module>
    result = subprocess.Popen('ping -n 3 google.com', shell=True, stdout=subprocess.PIPE).stdout.read()
  File "C:\Program Files\Kodi\system\python\Lib\subprocess.py", line 420, in __init__
    self.stdout = os.fdopen(c2pread, 'rb', bufsize)
OSError: (2, 'No such file or directory')
-->End of Python script error report<--

what is wrong with subprocess.Popen in 64-bit Kodi?

addon.xml:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.service.ping-addon" name="Ping addon" version="1.0.0" provider-name="iwis">
    <requires>
        <import addon="xbmc.python" version="2.25.0" />
    </requires>
    <extension point="xbmc.python.script" library="default.py" />
    <extension point="xbmc.addon.metadata">
        <summary lang="en_GB">Pings Google</summary>
        <description lang="en_GB">...</description>
        <platform>windx</platform>
        <license></license>
        <source></source>
        <forum></forum>
        <email></email>
        <assets>
        </assets>
    </extension>
</addon>

Playback randomly stops – KODI 17

Hi, sorry or my bad english. I'm using Kodi 17 on my Android TV Phillips. I play my movies over smb from my Synology NAS. When i start playback, it randomly stops - usually once per one movie, usually after 1 hour of playing. My log: http://paste.ubu...

Mixed 76 Russian IPTV Channels (06-19)

Live Streams, russian, news, movies, sports, entertainment, documentary, kids channels, 19-06-2017 shqiperi iptv m3u playlist for kodi, acestream, vlc player, simpletv, ott player: | Первый канал | Дождь | RTG | 2×2 | 4kanal | russia hd | history | Россия 1 | ТНТ | kinotv | moy planeta | Рен ТВ | НТВ | rusong […]

so confussed

kay i am new to this whole android box thing.. so here goes i will try and exspain everything so you all understand... lol kay i own a MXQ pro 4k now lol stupid me reset the whole box and know my kodi is gone i have tried everything i went to the kodi...

Manual Artwork DLer not showing Logo DL option suddenly

Hi Today I suddenly noticed that when I go into "Extras" in Movie or TV info and try to use the "Manual DL" option for DLing logos, Ive noticed it (logos) is suddenly no longer available. Anyone seen this? Anyone know whats going on here? Does this ...

Maximum-No. Ukraine, Boyarka

#EXTM3U #EXTINF:-1,СТБ http://94.158.80.117:9000/play/ch_145_1 #EXTINF:-1,Discovery Science http://94.158.80.117:9000/play/ch_206_1 #EXTINF:-1,Q TV http://94.158.80.117:9000/play/ch_80_1 #EXTINF:-1,Music Box http://94.158.80.117:9000/play/ch_76_1 #EXTINF:-1,Україна http://94.158.80.117:9000/play/ch_158_1 #EXTINF:-1,Інтер http://94.158.80.117:9000/play/ch_110_1 #EXTINF:-1,М1 http://94.158.80.117:9000/play/ch_119_1 #EXTINF:-1,НТН http://94.158.80.117:9000/play/ch_129_1 #EXTINF:-1,112 Україна http://94.158.80.117:9000/play/ch_53_2 #EXTINF:-1,М2 http://94.158.80.117:9000/play/ch_120_1 #EXTINF:-1,UA:Перший http://94.158.80.117:9000/play/ch_87_1 #EXTINF:-1,Новый канал http://94.158.80.117:9000/play/ch_127_1 #EXTINF:-1,Tonis http://94.158.80.117:9000/play/ch_152_1 #EXTINF:-1,К2 http://94.158.80.117:9000/play/ch_114_1 #EXTINF:-1,Перший автомобільний http://94.158.80.117:9000/play/ch_131_1 #EXTINF:-1,ТЕТ http://94.158.80.117:9000/play/ch_150_1

Free m3u playlist 19-6-2017 {New m3u}

http://94.249.236.177:8000/get.php?username=osama&password=osama&type=m3u http://cm-group.ddns.net:8000/get.php?username=carmelo&password=cognato&type=m3u http://newlook-secure.com//get.php?username=jess_c068a7&password=6794hd&type=m3u http://iptvmedia6.dyndns.tv:8000/get.php?username=MilOsSkYp217&password=4blqaGnJKJ&type=m3u http://worldtv.gotdns.ch:25000/get.php?username=Serbianfriend&password=qDt7W3kdA7&type=m3u http://167.114.64.174:7000/get.php?username=declan&password=SD335AE&type=m3u http://universesat.net:8000/get.php?username=benjamin&password=benjamin&type=m3u http://51.255.76.200:8000/get.php?username=11698U8i471494&password=Yp21W49jy44817&type=m3u http://iptv.iptvthebest.net:15000/get.php?username=oejr9weyfhon&password=088wemfe&type=m3u http://iptvmedia6.dyndns.tv:8000/get.php?username=MilOsSkYp217&password=4blqaGnJKJ&type=m3u http://s02.bihnet.net/playlist?type=m3u&deviceUser=dino.osmicic&devicePass=osmicic.dino http://iptv.leeztv.com/[email protected]&password=zl24F7ne1M&type=m3u http://s02.bihnet.net/playlist?type=m3u&deviceSn=042014n009375&deviceMac=00:1a:79:1c:97:af http://sutverduz.com:8080/get.php?username=ibbjfrjf&password=rp71Yd73Gn&type=m3u http://51.255.76.200:8000/get.php?username=4g1418q281NR94&password=71aAl779mt8449&type=m3u http://37.26.105.7:8001/playlist.m3u8 http://188.124.211.93:9090/playlist.m3u8  

ПРОМОКОД ТАКСИ GETT . БЕСПЛАТНЫЕ ПОЕЗДКИ НА ТАКСИ

БЕСПЛАТНЫЕ ПОЕЗДКИ НА ТАКСИ GETT МАКСИМАЛЬНЫЕ ПРОМО-КОДЫ GETT TAXI НА ПЕРВУЮ БЕСПЛАТНУЮ ПОЕЗДКУ! СКАЧАЙ ПРИЛОЖЕНИЕ GETT НА СВОЙ ТЕЛЕФОН И ВВЕДИ ПРОМОКОД: GTCAXAN Получи от 400 до 1000 руб бонусами! *Сумма бонусов зависит от региона, промокод действует только на 1 поездку Узнайте подробнее об акции на нашем сайте: http://htru.ru/rm98 #такси #GETT #максимальные #промокод #Бесплатные #поездки #GET… Read More »

Empty gray box

On my fire stick I keep getting a empty gray box in the right lower corner of my TV. I factory reset my fire stick and installed an updated version of kodi 17.3 but that did not work either. The box appears when I'm in the setting menu or watching a mo...

[release] script.module.requests-cache

https://github.com/reclosedev/requests-cache
packaged for kodi

if you use the requests package to communicate with web sites, requests-cache offers a transparent way to cache the replies from those sites without much change in your code.
Just import the requests-cache package, set-up the cache file and all requests response will be cached.

usage:

Code:
import requests_cache

#define the cache file to reside in the ..\Kodi\userdata\addon_data\(your addon)
addonUserDataFolder = xbmc.translatePath(addon.getAddonInfo('profile'))
CACHE_FILE          = xbmc.translatePath(os.path.join(addonUserDataFolder, 'requests_cache'))

#cache expires after: 86400=1 day   604800=7 days
requests_cache.install_cache(CACHE_FILE, backend='sqlite', expire_after=604800 )

Кедр . Украина, Золотоноша

#EXTM3U #EXTINF:-1, National Geographic http://195.189.249.6:8000/play/a005/index.m3u8 #EXTINF:-1, Fox http://195.189.249.6:8000/play/a00f/index.m3u8 #EXTINF:-1, Eurosport 1 http://195.189.249.6:8000/play/a00d/index.m3u8 #EXTINF:-1, Discovery HD http://195.189.249.6:8000/play/a004/index.m3u8 #EXTINF:-1, Домашний http://195.189.249.6:8000/play/a00i/index.m3u8 #EXTINF:-1, Animal Planet http://195.189.249.6:8000/play/a007/index.m3u8 #EXTINF:-1, Кино ТВ HD http://195.189.249.6:8000/play/a00k/index.m3u8 #EXTINF:-1, MyZen.tv HD http://195.189.249.6:8000/play/a00n/index.m3u8 #EXTINF:-1, TLC http://195.189.249.6:8000/play/a00b/index.m3u8 #EXTINF:-1, Відродження http://195.189.249.6:8000/play/a00o/index.m3u8 #EXTINF:-1, Киносемья http://195.189.249.6:8000/play/a00j/index.m3u8 #EXTINF:-1, Дисней http://195.189.249.6:8000/play/a00m/index.m3u8 #EXTINF:-1, Eurosport 2 http://195.189.249.6:8000/play/a00e/index.m3u8 #EXTINF:-1, English Club http://195.189.249.6:8000/play/a00c/index.m3u8 #EXTINF:-1, Наше Новое… Read More »

Kodi addon download/update issues

I am using KODI 17.3 version on my Andorid TV box. http://www.droidtvboxes.co.uk/the-limitless-box/ 1. When i try to install Fusion Addon, I have entered http://fusion.tvaddons.ag as the source. Select SYSTEM Select Add-Ons Select Install from zip f...