Skip to content
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

unexpected error while fetching topojson file #155

Open
acardoco opened this issue Jan 23, 2023 · 2 comments
Open

unexpected error while fetching topojson file #155

acardoco opened this issue Jan 23, 2023 · 2 comments
Labels
bug something broken P3 not needed for current cycle

Comments

@acardoco
Copy link

acardoco commented Jan 23, 2023

Hello! My work environment has been built with virtualenv, python 3.8 and I have plotly version 5.6 and the latest version of kaleido installed.

I have encountered the following error when I try to save the image in offline mode (without Internet access):

... raise ValueError( ValueError: Transform failed with error code 525: unexpected error while fetching topojson file at https://cdn.plot.ly/world_110m.json

I have already tried to pass the file as path, which does not take it well, as URI, which does not parse it well. I've also tried calling low-level API functions and it keeps giving me the same error.

Has anyone tried running the write_image() function offline?

Here is my main code:

` import plotly.graph_objects as go

        self._plot = go.Figure()
	core_plot = go.Choropleth(
		locations=geodata["country_code"],
		geojson=str(self.topojson_path),
		z=geodata['ip'],
		text=geodata['country'],
		colorscale='bluyl',
		autocolorscale=False,
		reversescale=False,
		marker_line_color='darkgray',
		marker_line_width=0.5,
		colorbar_title='Number'
	)
	self._plot.add_traces(core_plot)
	self._plot.update_layout(
		title_text='Title',
		title_x=0.5,
		geo_scope=self.geo_scope,  
		geo=dict(showframe=True, showcoastlines=True, projection_type='equirectangular'),
		annotations=[]
	)

	self._plot.write_image(self.image_path, scale=1.5)`

All the best

@oerhahon
Copy link

@acardoco were you able to resolve this issue?

@gvwilson gvwilson self-assigned this Jul 26, 2024
@gvwilson
Copy link
Collaborator

Thanks for your interest in Kaleido. We are currently working on an overhaul that might address your issue - we hope to have news in a few weeks and will post an update then. Thanks - @gvwilson

@gvwilson gvwilson removed their assignment Aug 3, 2024
@gvwilson gvwilson added bug something broken P3 not needed for current cycle labels Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 not needed for current cycle
Projects
None yet
Development

No branches or pull requests

3 participants