Forum Discussion
Python script error in Power Query Editor PythonUnexpectedException
- 7 years ago
Hi Anonymous ,
From the Data Source Settings dialog, select the data source(s) and then select Edit Permissions... and ensure that the Privacy Level is set to Public.

Hi Anonymous ,
From the Data Source Settings dialog, select the data source(s) and then select Edit Permissions... and ensure that the Privacy Level is set to Public.

- sergiobogazzi7 years agoNew Member
Hi All, unfortunately i have the same problem since installing the June 2019 Power BI update and changing the data source's privacy level to public did not fix the problem. I appreciate any additional support anyone has on this issue.
- apods19795 years agoHelper I
C:\Users\YouUSER\Anaconda3
C:\Users\YouUSER\Anaconda3\Library\mingw-w64\bin
C:\Users\YouUSER\Anaconda3\Scripts
C:\Users\YouUSER\Anaconda3\Library\bin
- Anonymous7 years agoNot applicable
That works, thanks a lot!
- Anonymous6 years agoNot applicable
I met this same problem but can fix by solution here.
my code:
import re hours_lst = [] for s in zip(dataset['timeSpent']): p = re.compile("(?P<day>\d+d)?\s*(?P<hour>\d+h)?\s*(?P<minute>\d+m)?") m = re.search(p, str(s)) day = m.group('day') day = re.findall("\d+", day)[0] if day else 0 hour = m.group('hour') hour = re.findall("\d+", hour)[0] if hour else 0 minute = m.group('minute') minute = re.findall("\d+", minute)[0] if minute else 0 hours = 8*int(day) + int(hour) + float(minute)/60 hours_lst.append(0) dataset['hours'] = hours_lst