Содержание
- EXCEPTION: JSON Parse error: Unexpected EOF #42
- Comments
- Footer
- JSON Parse error: Unexpected EOF OK
- JSON Parse error: Unexpected EOF OK
- Re: JSON Parse error: Unexpected EOF OK
- Re: JSON Parse error: Unexpected EOF OK
- Re: JSON Parse error: Unexpected EOF OK
- Re: JSON Parse error: Unexpected EOF OK
- Re: JSON Parse error: Unexpected EOF OK
- Re: JSON Parse error: Unexpected EOF OK
- Re: JSON Parse error: Unexpected EOF OK
- Re: JSON Parse error: Unexpected EOF OK
- Re: JSON Parse error: Unexpected EOF OK
- Re: JSON Parse error: Unexpected EOF OK
- Re: JSON Parse error: Unexpected EOF OK
- Re: JSON Parse error: Unexpected EOF OK
- Re: JSON Parse error: Unexpected EOF OK
- Помощь
- SyntaxError: JSON Parse error: Unexpected EOF
- [Solved] SyntaxError: unexpected EOF while parsing in Python?
- ◈ What Is A Syntax Error In Python?
- ✨ Scenario 1: Incomplete Loop/Function/If Statement
- ➥ Example 1: Unexpected End Of For Loop
- ➥ Example 2: Unexpected End Of Function
- ✨ Scenario 2: Missing Parenthesis
- ➥ Example 1:
- ➥ Example 2:
- ✨ Scenario 3: Using try without except/finally
- ✨ Scenario 4: Using the eval() function on str()
- Conclusion
EXCEPTION: JSON Parse error: Unexpected EOF #42
Despite it does not prevent the application to start, this strange error appears only on iOS:
I created an specific fork for easy reproduction that is available here: https://bitbucket.org/ignaciolarranaga/nativescript-webpack-problems.git
Please checkout the tag problem-1 (I might add more issues if I found them)
The text was updated successfully, but these errors were encountered:
While not with exactly the same code (but minor changes any way) I also see the error on Android:
I think is more related to the execution than to the code it self, it means, something get wrong while preparing the build or make the lunch of vendors.
Thanks for sending that project. The error comes from the ng2-translate plugin trying to issue requests and parse localization json files. To fix it, you need two changes:
- Add a rule to copy your i18n folder to the device in webpack.common.js . Look for the CopyWebpackPlugin section, and add: < from: «i18n/**» >,
- Change your translate factory function, so that it uses
/i18n as the locale files root: return new TranslateStaticLoader(http, «
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
JSON Parse error: Unexpected EOF OK
JSON Parse error: Unexpected EOF OK
Post by nuno » Sat Jan 17, 2015 7:09 pm
I am getting the following error when trying to update orders:
SyntaxError: JSON Parse error: Unexpected EOF
OK
Would you happen to have an idea on how to solve this issue? I am currently using Opencast 2.0.1.1, any help would be welcome.
Re: JSON Parse error: Unexpected EOF OK
Post by opencarthow.com » Sat Jan 17, 2015 7:48 pm
nuno wrote: Hello, guys,
I am getting the following error when trying to update orders:
SyntaxError: JSON Parse error: Unexpected EOF
OK
Would you happen to have an idea on how to solve this issue? I am currently using Opencast 2.0.1.1, any help would be welcome.
Re: JSON Parse error: Unexpected EOF OK
Post by nuno » Sat Jan 17, 2015 11:01 pm
Re: JSON Parse error: Unexpected EOF OK
Post by opencarthow.com » Sun Jan 18, 2015 1:09 am
Re: JSON Parse error: Unexpected EOF OK
Post by AlphaAlpha » Thu Feb 05, 2015 6:23 pm
Hello,
excuse me btt the link you suggested is no longer available, could you be so kind to send the new link or publish the solution ?
Thank you very much
Re: JSON Parse error: Unexpected EOF OK
Post by viethemes » Thu Feb 05, 2015 9:12 pm
AlphaAlpha wrote: Hello,
excuse me btt the link you suggested is no longer available, could you be so kind to send the new link or publish the solution ?
Thank you very much
http://www.viethemes.com — OpenCart turtorials, news, tips and stricks, extension
Our extensions:
Visual Theme Editor — Powerful tool for customizing style of any theme visually
Live Theme Editor — Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation — Animation Editor for any theme
Re: JSON Parse error: Unexpected EOF OK
Post by AlphaAlpha » Thu Feb 05, 2015 10:25 pm
No it is not in Maintenace Mode but the problem is that the link suggested is not available, if you try to click on it, you receive a link error.
Re: JSON Parse error: Unexpected EOF OK
Post by viethemes » Thu Feb 05, 2015 11:14 pm
AlphaAlpha wrote: No it is not in Maintenace Mode but the problem is that the link suggested is not available, if you try to click on it, you receive a link error.
http://www.viethemes.com — OpenCart turtorials, news, tips and stricks, extension
Our extensions:
Visual Theme Editor — Powerful tool for customizing style of any theme visually
Live Theme Editor — Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation — Animation Editor for any theme
Re: JSON Parse error: Unexpected EOF OK
Post by fido-x » Fri Feb 06, 2015 8:50 am
nuno wrote: Hello, guys,
I am getting the following error when trying to update orders:
SyntaxError: JSON Parse error: Unexpected EOF
OK
Would you happen to have an idea on how to solve this issue? I am currently using Opencast 2.0.1.1, any help would be welcome.
Modules for OpenCart 2.3.0.2
Homepage Module [Free — since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you’re not living on the edge . you’re taking up too much space!
Re: JSON Parse error: Unexpected EOF OK
Post by viethemes » Fri Feb 06, 2015 10:16 am
http://www.viethemes.com — OpenCart turtorials, news, tips and stricks, extension
Our extensions:
Visual Theme Editor — Powerful tool for customizing style of any theme visually
Live Theme Editor — Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation — Animation Editor for any theme
Re: JSON Parse error: Unexpected EOF OK
Post by fido-x » Fri Feb 06, 2015 4:21 pm
Under the «Options» tab in the store settings, there are three settings for order statuses. They are:
- Order Status (the default status applied to orders)
Processing Order Status (multiple selection)
Complete Order Status (multiple selection)
When you update an order’s history, you must use an order status that you have selected, either from the «Processing Order Status» list, or from the «Complete Order Status» list.
If you update to an order status that has not been selected, you will get a JSON error.
Modules for OpenCart 2.3.0.2
Homepage Module [Free — since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you’re not living on the edge . you’re taking up too much space!
Re: JSON Parse error: Unexpected EOF OK
Post by AlphaAlpha » Sat Feb 07, 2015 4:43 am
All the three settings are properly set and the result is still the same.
Any possibility that the problem could be the server where I use to test the OC web site before to publish in the right domain ?
I use altervista.org for testing
Re: JSON Parse error: Unexpected EOF OK
Post by gbisqit » Wed Mar 11, 2015 10:29 am
1. Disable the Maintenance Mode in admin > System > Stores > Your store > tab Server.
2. Go to Admin > System > Users > API > Create new API account.
3. Go to Admin > System > Settings > Edit your store > Select tab Option > Checkout section > set API User to the created account.
Re: JSON Parse error: Unexpected EOF OK
Post by conticreative » Wed May 20, 2015 6:34 am
I am having this very error, but at checkout. I used to have the error when managing orders but thanks to a post in this thread I created a new API key and that solved that problem.
However, when I try to checkout right when the account is being created I get this:
NOTE: the error message goes on and on and looks like a JSON page full of addresses, zip codes, etc. Be happy to publish it if necessary.
What happens then is that the account is created, but the checkout page doesn’t respond anymore. If I then login and checkout again, the checkout works fine, but this is clearly too convoluted for a regular customer to go through. The big error popup is going to scare everyone away.
Incidentally, if I checkout as guest, everything works fine.
I hope to find a solution for this. We are about to lunch but we can’t until the checkout is fixed.
Источник
Помощь
Odoo is the world’s easiest all-in-one management software.
It includes hundreds of business apps:
SyntaxError: JSON Parse error: Unexpected EOF
EDIT: Figured out the issue here was likely with Ubuntu 14 and wkhtmltopdf, creating a new VM with Ubuntu 12 instead solved the problem.
I recently installed a new instance of OpenERP v7.0, and am getting an error when trying to install a custom report module: SyntaxError: JSON Parse error: Unexpected EOF:
Traceback (most recent call last):
File «/opt/openerp/odoo/openerp/netsvc.py», line 296, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File «/opt/openerp/odoo/openerp/service/web_services.py», line 654, in dispatch
res = fn(db, uid, *params)
File «/opt/openerp/odoo/openerp/service/web_services.py», line 760, in exp_report_get
return self._check_report(report_id)
File «/opt/openerp/odoo/openerp/service/web_services.py», line 738, in _check_report
netsvc.abort_response(exc, exc.message, ‘warning’, exc.traceback)
File «/opt/openerp/odoo/openerp/netsvc.py», line 71, in abort_response
raise openerp.osv.osv.except_osv(description, details)
except_osv: (u»list index out of rangeparagraph text u’
‘ caused exceptionnhandle_pageBegin args=()», ( , IndexError(«list index out of rangeparagraph text u’
Any idea why this might be? It worked perfectly in my other instance. One thing that might have caused it is that I had a v7 saas-5 instance on the same server, but I removed the git repo and reinstalled. Should I nuke/pave the VM and try again? The other thing I noticed is that my old version (installed by someone else) is at Version 7.0-20131113-002526, where my new one says just Version 7.0 — not sure if that could be causing it too. Any insight would be greatly appriciated!
Источник
[Solved] SyntaxError: unexpected EOF while parsing in Python?
Aim:
In this article, we will discuss how to fix SyntaxError: unexpected EOF while parsing in Python?
This article dissects our problem with examples and helps you get a firm grip on the minute details, which ultimately leads to our problem.
◈ What Is A Syntax Error In Python?
Syntax errors occur when the Python compiler cannot understand the source code written by you and is unable to generate the machine code. Syntax error generally appear at compile-time and are reported by the interpreter.
Example: Incomplete if statement that lacks a colon at the end.
Output:
EOF is the abbreviation for End of File.
The EOFError is raised in situations where the end of a file is reached before running every block of code in the file.
Let’s visualize the following:
Most of you will find a glitch because you ran into an “unexpected end of paragraph” above. Not only does the paragraph above end mid-sentence, but also it ends mid-word! Now, imagine – Python is in a similar situation. That’s when it returns SyntaxError: unexpected EOF while parsing .
The following scenarios will help you to understand the occurrence of such errors and the ways to solve them.
✨ Scenario 1: Incomplete Loop/Function/If Statement
You must include at least one line of code within a For loop, While loop, if statements or functions ; otherwise, it leads to the occurrence of Unexpected EOF error.
➥ Example 1: Unexpected End Of For Loop
Output:
✍️ Solution:
You can use a print statement within the for loop body if you want to print the items of the lang list. You may also opt to use the pass statement if you do not wish to print anything and also avoid the error.
Output:
➥ Example 2: Unexpected End Of Function
Output:
✍️ Solution:
The above error occurred because Python found an unexpected end to the function func() . Therefore you can avoid this error by using a pass statement within the function or by using a print statement to print something that meets your requirement.
Output:
✨ Scenario 2: Missing Parenthesis
If you forget to close all the parenthesis in a line of code within your program, then Python will raise the SyntaxError: unexpected EOF while parsing .
➥ Example 1:
Output:
✍️ Solution:
The above error occurred because of a minute syntactic mistake wherein we forgot to close the print statement using a closing parenthesis ) . To solve the error you simply have to close the print statement properly.
Output:
➥ Example 2:
Let us have a look at another case where a dictionary is incomplete and Python raises SyntaxError: unexpected EOF while parsing .
Output:
✍️ Solution:
Close the dictionary using the closing parenthesis to avoid the error.
Output:
✨ Scenario 3: Using try without except/finally
You will encounter the SyntaxError: unexpected EOF while parsing if you define a try block. However, you do not have an except or finally block.
➥ Example:
Output:
✍️ Solution:
To overcome this error, you have to define an except or finally block corresponding to the try block.
Output:
✨ Scenario 4: Using the eval() function on str()
Python does not permit the usage of eval() function on str() and it leads to the SyntaxError: unexpected EOF while parsing .
➥ Example:
Output:
✍️ Solution:
To avoid the above error you can replace the str() function with the repr() function.
Output:
Conclusion
To summarize our discussion, “SyntaxError: unexpected EOF while parsing” error in Python occurs when Python reaches the end of execution abruptly before every line of code has finished its execution. This happens when:
- The code has an incomplete Loop/Function/If Statement.
- The code has a try block but no finally or except blocks.
- You are trying to implement eval() on str() .
To avoid this error, you should ensure that all the statements within your code are complete and have proper opening and closing parenthesis. Also, make sure that you define an except or finally block if the code has a try block.
I hope this article was helpful. Please subscribe and stay tuned for more exciting articles. Happy Learning! 📚
Источник
Despite it does not prevent the application to start, this strange error appears only on iOS:
Project successfully built
Successfully deployed on device with identifier '00A4117D-42D7-4D34-A741-4D4FAA4286CD'.
CONSOLE LOG file:///app/vendor.ts:null:null: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
CONSOLE ERROR file:///app/vendor.ts:null:null: EXCEPTION: JSON Parse error: Unexpected EOF
Dec 24 08:09:43 MacBook-Pro-de-Ignacio hezeaapp[13032]: CONSOLE ERROR file:///app/vendor.js:26786:32: ORIGINAL STACKTRACE:
Dec 24 08:09:43 MacBook-Pro-de-Ignacio hezeaapp[13032]: CONSOLE ERROR file:///app/vendor.js:26787:32: parse@[native code]
_next@file:///app/vendor.js:16320:39
next@file:///app/vendor.js:5596:23
file:///app/vendor.js:46805:40
invoke@file:///app/vendor.js:45881:33
onInvoke@file:///app/vendor.js:18568:43
invoke@file:///app/vendor.js:45880:42
run@file:///app/vendor.js:45774:49
file:///app/vendor.js:46140:60
invokeTask@file:///app/vendor.js:45914:42
onInvokeTask@file:///app/vendor.js:18559:47
invokeTask@file:///app/vendor.js:45913:54
runTask@file:///app/vendor.js:45814:57
drainMicroTaskQueue@file:///app/vendor.js:46046:42
promiseReactionJob@[native code]
UIApplicationMain@[native code]
start@file:///app/vendor.js:8354:30
bootstrapApp@file:///app/vendor.js:60192:26
bootstrapModuleFactory@file:///app/vendor.js:60173:26
file:///app/bundle.js:2187:139
__webpack_require__@file:///app/vendor.js:53:34
webpackJsonpCallback@file:///app/vendor.js:25:42
anonymous@file:///app/bundle.js:2:13
evaluate@[native code]
moduleEvaluation@[native code]
[native code]
promiseReactionJob@[native code]
require@[native code]
anonymous@file:///app/starter.js:2:8
evaluate@[native code]
moduleEvaluation@[native code]
[native code]
promiseReactionJob@[native code]
I created an specific fork for easy reproduction that is available here: https://bitbucket.org/ignaciolarranaga/nativescript-webpack-problems.git
Please checkout the tag problem-1 (I might add more issues if I found them)
While not with exactly the same code (but minor changes any way) I also see the error on Android:
Project successfully built
Successfully deployed on device with identifier 'emulator-5554'.
JS: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
JS: EXCEPTION: Unexpected end of JSON input
JS: ORIGINAL STACKTRACE:
JS: SyntaxError: Unexpected end of JSON input
JS: at Object.parse (native)
JS: at Response.Body.json (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:40233:25)
JS: at MapSubscriber.project (/data/data/com.hezea.ForSaleByOwner/files/app/bundle.js:2692:46)
JS: at MapSubscriber._next (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:17300:35)
JS: at MapSubscriber.Subscriber.next (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:6044:18)
JS: at /data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:45464:36
JS: at ZoneDelegate.invoke (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:44470:28)
JS: at Object.onInvoke (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:19889:37)
JS: at ZoneDelegate.invoke (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:44469:34)
JS: at Zone.run (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:44363:43)
I think is more related to the execution than to the code it self, it means, something get wrong while preparing the build or make the lunch of vendors.
Thanks for sending that project. The error comes from the ng2-translate
plugin trying to issue requests and parse localization json files. To fix it, you need two changes:
- Add a rule to copy your
i18n
folder to the device inwebpack.common.js
. Look for theCopyWebpackPlugin
section, and add:{ from: "i18n/**" },
- Change your translate factory function, so that it uses
~/i18n
as the locale files root:return new TranslateStaticLoader(http, "~/i18n");
У меня есть следующая строка кода:
data = jQuery.parseJSON(data);
Что создает следующую ошибку…
SyntaxError: JSON Parse error: Unexpected EOF
Однако я не могу понять, как определить причину ошибки.
Есть идеи?
Здесь данные…
{
"element_type": "paint",
"edit_element_id": "2117",
"paint_id": "15",
"paint_editable_data": "zwibbler3.[{"id":0,"type":"GroupNode","fillStyle":"#cccccc","strokeStyle":"#000000","lineWidth":2,"shadow":false,"matrix":[1,0,0,1,0,0],"layer":"default"},{"id":1,"type":"PageNode","parent":0,"fillStyle":"#cccccc","strokeStyle":"#000000","lineWidth":2,"shadow":false,"matrix":[1,0,0,1,0,0],"layer":"default"},{"id":2,"type":"BrushNode","parent":1,"fillStyle":"#cccccc","strokeStyle":"#000000","lineWidth":10,"shadow":false,"matrix":[1,0,0,1,0,0],"layer":"default","points":[17,21,17,22,17,24,17,28,18,34,37,55,49,59,70,61,89,56,92,55,93,54]},{"id":3,"type":"PathNode","parent":1,"fillStyle":"#e0e0e0","strokeStyle":"#000000","lineWidth":2,"shadow":false,"matrix":[1,0,0,1,-14,-85],"layer":"default","textFillStyle":"#000000","fontName":"Arial","fontSize":20,"dashes":"","smoothness":0.3,"sloppiness":0,"closed":true,"arrowSize":0,"arrowStyle":"simple","doubleArrow":false,"text":"","roundRadius":0,"commands":[0,150,100,6,200,150,200,100,6,150,200,200,200,6,100,150,100,200,6,150,100,100,100,7],"seed":36934}]",
"paint_image_data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALwAAAB1CAYAAAD0rovXAAASHklEQVR4Ae1dCXBW1RW+BAKJNAwihMWgkYk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uuP1tZpcBssPHrdp00aFW23POYgZM2ao0aNHq2+++YalchxIAZYCjok4vGNUuqboNDTPBurhp74NNwhds2aN1q6/9957XUvUS8Xbtm1Tw4cP19YUBb6nyvz2Bf7jtB0yj+00o+7qewzq3wMaMZmUlBRtiXHDhg15GnLCz9FMnDhRrVq1Srf9KA5GAmv0C06H4vBOM+q+vhgk8SLwEhAbHR2t0tLSVEZGhqpdu7b7qTuQQl5enpo2bZpasGCBvv8jB9hfB94AtLewHUimVBXi8KXSEhIXE2DleOBpICo2NlYNGjRIpaenB63j09G5b8z8+fP1SSSOSM0FMgE23VwXcXjXKXY9gWZIgY7/BFOKiYlRqampavDgwapFixa85Lvs3btXzZs3T2VlZenbaNAmvqFER9/HE69EHN4rpt1PpzWSeBXoB2jlmpSUpHr16qWhZcuW7ltgSIHLAbhEgjB8SY9Di5xj+CtgeeGXQb3tQ3F429QF7YPc/2YE8AxQR7eS7fsOHTpoE1gMGzXS+r367QqHHD/fsmWLys3N1UI2XwzCV/A48jITOGK47vmhOLznlHuWYDRSegTgMlriPqBQ2Obn4rT4+HgtLH6sn/OBCxcuKG5jp8N4rh8HFnYV6sfBSWBFAJ8j5AZJvos4vO9F4JkBXJDTFegWCJ1einkeenMC2IAwKDfEF4dHyUSo3IN81w+gnuFYv6aHpOdsKThX7BrfQBIRBoSBYGLg/9jYtJnVySp3AAAAAElFTkSuQmCC"
}
Возможно ли, что проблема?
SyntaxError: JSON Parse error: Unexpected EOF
Hi all
Whenever I try to add an order in the admin panel I get this error when I try to hit the continue-button on the invoice address page:
SyntaxError: JSON Parse error: Unexpected EOF
HTTP/2.0 200
I tried every solution I found here including changing the API user, nothing helped. No new entries in the log file… Any ideas? OC version is 2.3.0.2.
Thanks
Dom
Re: SyntaxError: JSON Parse error: Unexpected EOF
Post
by labeshops » Sun Oct 30, 2016 9:08 pm
EOF = end of file. It usually means one of your files did not upload completely. Since you say it happens when you try to add an order, I’d re-upload new copies of your admin folder that has order.x — controller, model and view/templates
If that does not solve it, check what mods you have installed and see if one of them alters one of your order files from above. If so, disable it and see if it solves the issue.
Running Opencart v3.0.3.2 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
Re: SyntaxError: JSON Parse error: Unexpected EOF
Post
by doeme » Mon Oct 31, 2016 4:26 am
Hmm, unfortunatly that did not help
I’ve re-uploaded all files, still EOF… Any other ideas?
Re: SyntaxError: JSON Parse error: Unexpected EOF
Post
by doeme » Mon Oct 31, 2016 8:47 pm
Thanks cyclops12, I have checked my statuses in the shop options, added some and now I get:
SyntaxError: Unexpected end of JSON input
parsererror
New error, new luck… Anyone ?
Re: SyntaxError: JSON Parse error: Unexpected EOF
Post
by doeme » Thu Nov 03, 2016 8:47 pm
does anyone know what could help me here?
SyntaxError: Unexpected end of JSON input
parsererror
Re: SyntaxError: JSON Parse error: Unexpected EOF
Post
by IP_CAM » Fri Nov 04, 2016 8:55 am
Is this a Clean new OC-2.3.x Upload, installed on a CLEAN DB, or is it some kind of Mixup, coming
from an older Version OC Setup ?
And how did you UPLOAD the Software, and did you use correct Settings (ASCII / Binary) during Upload ?
Ernie
My Github OC Site: https://github.com/IP-CAM
5’000 + FREE OC Extensions, on the World’s largest Github OC Repository Archive Site.
Re: SyntaxError: JSON Parse error: Unexpected EOF
Post
by doeme » Fri Nov 04, 2016 4:28 pm
Hoi Ernie
It was a clean, fresh installation of OC 2.3.0.2. I’ve uploaded all files in FileZilla’s automatic mode, never heard of anything what said I should upload in a specific mode. What do you recommend?
Thanks / Merci
Dominik
Re: SyntaxError: JSON Parse error: Unexpected EOF
Post
by IP_CAM » Fri Nov 04, 2016 7:49 pm
Ich sags Dir lieber nicht, sonst flieg ich noch, bei der momentanen Nullbock Stimmung hier.
I don’t know FileZilla and it’s default settings, depending on the File Extension.
But it, strictly technically, could be, that some Files have not been installed correctly,
in ASCII and/or Binary Style, Or then, some/scripts files may not have been installed, possibly.
It all happen once in a while, and it must be something, after all !
Personally I still use a very old Version of WS-FTP for such.
Good Luck
Ernie
My Github OC Site: https://github.com/IP-CAM
5’000 + FREE OC Extensions, on the World’s largest Github OC Repository Archive Site.
Re: SyntaxError: JSON Parse error: Unexpected EOF
Post
by doeme » Fri Nov 04, 2016 8:22 pm
thanks ernie. and whats your recomondation now, ascii or binary?
Who is online
Users browsing this forum: Vinovins and 9 guests
“Unexpected end of JSON input” (or “Uncaught SyntaxError: Unexpected end of JSON input”) is a common error message in JavaScript, occurs when the user tries to convert an invalid JSON string into a native JS object using JSON.parse()
method. This short article will try to clarify a few things about the error and possible steps to fix it.
The full form of the message would look like this in the browser’s Console.
Uncaught SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at <your-script-name.js>
Code language: JavaScript (javascript)
“Unexpected end of JSON input” root cause is a malformed string passed into the JSON.parse()
method.
In most cases, it is due to a missing character in the last position of a JSON string that wraps its objects (such as a closing square bracket []
or curly bracket {}
).
Sometimes, you may be trying to read an empty JSON file. A valid empty JSON file would still need to have curly brackets to indicate that it contains an empty object.
Code language: JSON / JSON with Comments (json)
// empty.json file contents {}
Let’s look at two examples below to clearly understand what’s missing
Code containing errors | Corrected code. | |
---|---|---|
1 | var my_json_string = '{"prop1": 5, "prop2": "New York"'; var data = JSON.parse(my_json_string); |
var my_json_string = '{"prop1": 5, "prop2": "New York"}'; var data = JSON.parse(my_json_string); |
2 | var my_json_string = '[1, "yellow", 256, "black"'; var data = JSON.parse(my_json_string); |
var my_json_string = '[1, "yellow", 256, "black"]'; var data = JSON.parse(my_json_string); |
In the first example, there’s a missing closing curly bracket at the end of the string. Meanwhile, the second example demonstrate a malformed JSON string with the closing square bracket truncated.
Also check out: Object of type is not JSON serializable in Python
How to fix “Unexpected end of JSON input”
- Locate a statement using the
JSON.parse()
method. On the browser’s console, click on the last line of the exception message (which is a reference to the code block that raised that exception). The browser will then bring you to the actual source code. - Inspect the input of
JSON.parse()
. Now there are many ways to do this. You can take a close look at the data to spot the error. Usually it’s in the beginning or the end of the string. - If you use popular code editor software like VS Code, Sublime Text, Atom, you’ll also have another way to check the syntax of JSON data: Copy all that JSON data to a completely new file, the default formatter of the software will highlight the syntax error location.
- Alternatively, the browser Console also supports highlighting common JSON syntax error. You would need to click VMxx:x right next to the exception message.
Conclusion
We hope that the article helps you understand why “Unexpected end of JSON input” happens and how you can correct the input to fix it. If you do a lot of JSON manipulation in JavaScript, you may want to check out our guide on JSON end of file expected, which is another very common one. If you have any suggestions or spot an error in the article, feel free to leave a comment below to let us know.