Skip to content

ValueError: startfile: filepath too long for WindowsΒ #8

@robmarkcole

Description

@robmarkcole

When running:

from geojsonio import display
with open('map.geojson') as f:
    contents = f.read()
    display(contents)

with data from Google in the file map.geojson I receive the following error:

ValueError                                Traceback (most recent call last)
<ipython-input-6-cd14c4214ce4> in <module>()
      3 with open('map.geojson') as f:
      4     contents = f.read()
----> 5     display(contents)

C:\ProgramData\Anaconda3\lib\site-packages\geojsonio\geojsonio.py in display(contents, domain, force_gist)
     35     """
     36     url = make_url(contents, domain, force_gist)
---> 37     webbrowser.open(url)
     38     return url
     39 # display() used to be called to_geojsonio. Keep it around for now...

C:\ProgramData\Anaconda3\lib\webbrowser.py in open(url, new, autoraise)
     58     for name in _tryorder:
     59         browser = get(name)
---> 60         if browser.open(url, new, autoraise):
     61             return True
     62     return False

C:\ProgramData\Anaconda3\lib\webbrowser.py in open(self, url, new, autoraise)
    511         def open(self, url, new=0, autoraise=True):
    512             try:
--> 513                 os.startfile(url)
    514             except OSError:
    515                 # [Error 22] No application is associated with the specified

ValueError: startfile: filepath too long for Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions