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

No read method on valid file upload #67

Closed
wboykinm opened this issue Mar 6, 2016 · 4 comments
Closed

No read method on valid file upload #67

wboykinm opened this issue Mar 6, 2016 · 4 comments

Comments

@wboykinm
Copy link

wboykinm commented Mar 6, 2016

Just got this somewhat-cryptic message on trying to upload this valid demo geojson file

| => mapbox upload --name landplanner.demopoints demo.geojson
Usage: mapbox upload [OPTIONS] TILESET [INFILE]

Error: Invalid value: Object `None` has no .read method, a file-like object is required

My key is properly configured (I gave it all 12 scopes just in case) and exported to $MAPBOX_ACCESS_TOKEN, and the file is valid, so I'm not sure what's going on here. Is my account missing some authorization globally?

@perrygeo
Copy link
Contributor

perrygeo commented Mar 7, 2016

@wboykinm I think it's just a mix up in the command line arguments. demo.geojson was interpreted as the TILESET arg leaving the INFILE argument blank.

This should work

$ mapbox upload --name "Demo Points Title" landplanner.demopoints demo.geojson

                |------------------------| |--------------------| |----------|
                     Title in Studio             Tileset ID        input data

To clarify

  • --name is optional and defines the human-readable title you'll see in Studio
  • TILESET is required and defines the tileset id (with the <username>.<textid> pattern)
  • INFILE is the local data and should be required.

The cryptic error message is definitely a problem. INFILE should probably be a required argument and give a useful error message

Error: Missing argument "INFILE".

It appears to be explicitly not required so I'll have to review why that's the case.

@perrygeo
Copy link
Contributor

perrygeo commented Mar 7, 2016

@wboykinm thanks for the report. The above PR should at least make the error messages clear in the next version.

@wboykinm
Copy link
Author

wboykinm commented Mar 7, 2016

Awesome; thanks!

@wboykinm
Copy link
Author

wboykinm commented Mar 8, 2016

Resolved on my end. Thanks again @perrygeo.

@wboykinm wboykinm closed this as completed Mar 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants