How to fix JSONDecodeError? - osmnx

I am new to OSMnx and followed the steps from the website (https://github.com/gboeing/osmnx-examples/blob/master/notebooks/10-building-footprints.ipynb) on how to make a "Street network + building footprints: square-mile visualizations" map.
All I did was change the location name to teutopolis and change the coordinates to the town I am trying to map out, but it kept giving me a JSONDecodeError output. I added an image of what I input and the error output that it gave me. Being new to coding, I am not sure what this all means as I tried to search for an answer but did not understand.
Any help on how to fix this problem would be greatly appreciated.

Make sure you're using the latest version of OSMnx (0.8.1 as of this writing). This issue is documented on GitHub and was fixed/released two months ago.

Related

'TypeError: express_jwt__WEBPACK_IMPORTED_MODULE_2___default(...) is not a function' when trying to leverage express.jwt to auth required sign-in

Hope the holidays are treating everyone well. I'm a beginning coder working on a full stack application. Currently I'm trying to build a back end skeleton leveraging MongoDB, Express, and Node.js. Everything seems to be going well but for using an express json web token to authenticate a required sign-in method. What's odd to me is the error references '. . . Webpack imported module 2 . . .' . I am using Webpack and Babel as compilers etc. but don't have the experience to connect the relationship between Webpack and express-JWT. My guess is that one of the modules I'm working with is out of date and thus not compatible with the others but am not sure which one. Of course, there could be an error in my code but I've tried to debug based on the error message to no avail. Would greatly appreciate your insights and help - thank you!
As mentioned, I'm a beginning coder but have tried the following: a) the two stack overflow threads below seemed to point me to documentation or updated syntax and I've tried variations of both but to no avail.
express-jwt got TypeError: express_jwt__WEBPACK_IMPORTED_MODULE_2___default(...) is not a function
and
TypeError: Webpack imported module is not a function.
Given the suggestions to review documentation I reviewed Webpack, Express, and even React (plan to use react on the front end) documentation but again, I didn't see, what in my mind, could be related subject matter. I think someone with more experience would prob know exactly where to look in the documentation but I don't seem to be able to put the pieces together given the little coding experience I have. Guidance on where to look in the documentation would be great as I'm eager to get more comfortable reviewing primary reference material. Regardless, appreciate the help and plan to pay it forward one day soon - thanks again!
Screenshots below: respective code truncated for relevance, package.json file
[respective code truncated for relevance] (https://i.stack.imgur.com/iOwVK.png)
package.json file

How to solve assertion error in Google Colab?

I'm attempting to write some code to generate a model for 3D segmentation. I'm using a model code provided by the creators of Stardist to write my code but I keep getting an assertion error and I'm not sure how to fix it.
Here is the code provided:
Screenshot of the code from Stardist github page
Here is my attempt at reconstructing the code with the error I get when I attempt to run it.
Screenshot of my code
I was wondering if people had any solutions for the problem I'm getting? I'm almost completely new to coding and using github as a whole so not sure if there's a way to create a direct download link, like they have, or if it should just be able to find my files directly off my hardrive. I also attach a picture of how my files are labelled so can't see why the code can't assertain they have the same labeling:
Image of my pathway for first, the images
and secondly, the masks.
Thank you all,
N

mediapipe KNIFT template matching example: using own pics doesn not work properly - how does the example actually work?

i followed the example steps to create an own android app KNIFT template matching example like the 3 dollar bill example on the mediapipe website...did anyone of you build this and know how this really works? I cant get a clear documentation.
My approach to run my own example as suggested on the mediapipe: I have three example pics in my folder (and I did all the build steps with them) that are detected and framed indeed....but not as often and not as correctly as in the dollar bill example (which works fine for me, every bill is detected and framed and labeled as expected).
Also my labeling doesnt work properly. Sometimes it does partly, sometimes it is labeled but incorrect. What does the framework do with my pics and labels and how to optimize my own example?
Any help is appreciated...
regards, fabian

How can I fix a 'Undefined control sequence' error in order to convert a JupyterNotebook to PDF?

Hello everyone,
since this is my first post here (even though not my first time, because I've spent hours reading some of your brilliant answers over time), I hope you guys will forgive me initial mistakes, when it comes to writing a proper post.
I have a problem when trying to convert a JupyterNotebook, that runs on AWS SageMaker to PDF using nbconvert.
I am using the following command via the terminal:
jupyter nbconvert --to pdf MyNotebook.ipynb
And instead of the notebook converting into a PDF, I'll end up with the following error:
! Undefined control sequence.
\AfterEndPreamble ->\AddToHook
{begindocument/end}
l.158 \AfterEndPreamble
{%
?
! Emergency stop.
\AfterEndPreamble ->\AddToHook
{begindocument/end}
l.158 \AfterEndPreamble
{%
No pages of output.
Converting it to a .tex file, however, works without any problems.
Now I've spend the last hour, trying to solve this issue by searching the web and looking at similar problems, but for the first time I couldn't find any solution to my specific issue yet.
So I hope, some of you will be able to help me with it.
Appreciate it!

python vincent map does not display

I'm trying to use vincent package to visualize my data (in pandas) in jupyter notebook, but have trouble in initial attempt ,here is the code I use (copied from the http://wrobstory.github.io/2013/10/mapping-data-python.html):
import vincent
import pandas
world_topo=r'world-countries.topo.json'
geo_data = [{'name': 'countries',
'url': world_topo,
'feature': 'world-countries'}]
vis = vincent.Map(geo_data=geo_data, scale=200)
vis.to_json('vega.json')
vis.display()
After I ran the code, nothing was displayed. I checked the type of the vis:
vincent.charts.Map
I'm not sure how to proceed here, I appreciate any input on this problem.
Not sure at which point of implementation of this you are.
Assuming you just used pip to install vincent and tried the code in PY IDLE , you might be missing 2 important steps:
AFIK vincent only generates jsons to be presented using Vega via Jupyter notebook.
To render with Vega You will need to install:
1) Jupyter and dependencies
2) Vega and dependencies
I was able to do so using these instructions.
Once jupiter launched, a window opens in the browser, I had to choose 'Python3' under 'new', and put code in the prompt on that page.
Alternately you can use this online Vega renderer. Please also see Vega docs
Note that it seems that vincent is not the latest technology for that purpose, their page points to Altair
Also, I noticed that the json that is generated in 'vega.json' from the code you posted, using the original data, does not render anywhere. That's also an issue, probably happens because it uses outdated format, but I am not sure.
I have limited experience with this technology but I was able to get graphs to render, specifically this, and it is also how it looked for me.
I know that this post is old but I found your error and I thought I would answer here to help future users of vincent as it has worked beautifully for me. I am working with the anaconda version of vincent and jupyter notebook.
First, you have to initialize vincent in your notebook
import vincent
vincent.core.initialize_notebook()
and your next problem is that your URL isn't actually pointing anywhere. For the world map topography you need:
world_topo="https://raw.githubusercontent.com/wrobstory/vincent_map_data/master/world-countries.topo.json"
A decent map printed out for me with those two exceptions.