Forum Discussion
Pythan visual not showing in service
Hi,
I built a report where I needed a bubble chart with categorical data, and as there wasn't a compatible visual so I wrote a python script for it.
It worked in power bi service last week, although with some loading, and this week it doesn't want to display no more and I get this error
The report works just fine in Power BI Desktop, but somehow it doesn't work in PowerBI Service anymore
This is my code
# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:
# dataset = pandas.DataFrame(Time2, Type, BubbleSize, name)
# dataset = dataset.drop_duplicates()
# Paste or type your script code here:
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from datetime import time
import pandas as pd
import seaborn as sns
dataset.Time2 = pd.to_datetime(dataset.Time2, format='%H:%M:%S')
ax = sns.scatterplot(x=dataset.Time2, y=dataset.name, hue=dataset.Type, size=dataset.Type, sizes=(150,400), alpha=.75)
ax.set(xlabel='Time', ylabel='Luifel')
ax.xaxis.set_major_locator(mdates.HourLocator())
ax.xaxis.set_major_formatter(mdates.DateFormatter('%H:%M:%S'))
ax.tick_params(axis='x', rotation= 45)
plt.tight_layout()
plt.grid(axis="y", linestyle="--")
plt.show()
And this is the visual it generates
Could this just be a powerbi/python bug or is there something I can do to fix it?
The data comes from a SQL server so python isn't used for importing the data
Hi Woutvdg ,
This issue has been submited internal(ICM: 302195934). Please be patient to wait for fixing. If there is any news, I will update it here.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- v-yanjiang-msft
Community Support
Hi Woutvdg ,
This issue has been submited internal(ICM: 302195934). Please be patient to wait for fixing. If there is any news, I will update it here.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- v-yanjiang-msft
Community Support
Hi Woutvdg ,
The issue has been fixed now, please check it.
Best Regards,
Community Support Team _ kalyj