adds the properties on the graph to the manifest file.
Category Archives: How to Fix
Error resolution of unexpected token in JSON at position 0
This error, or a similar error, can occur when you send an HTTP request, perhaps using a FETCH or other Ajax library.
then I will explain this is caused by what, how should we solve these problems
1.
These errors occur when you send a request to the server that returns a value that is not JSON but is parsed using JSON methods. The code that does this might look like this.
the fetch (‘/users’). Then (res = & gt; Res.json ())
The actual request is fine, it gets a return value, and the key to the problem is res.json(). Parse
json. parse( not a JSON string )>arse
json. parse( is not a JSON string );
json.parse () is essentially the same as res.json(), so the error cases are the same.
3. Invalid JSON
unexpected token o in JSON at position 1″
error prompt Some differences will vary depending on the server return
The symbol or location it prompts may be different, but the reason for it is the same: all the JSON your code parses is not really valid JSON.
> Here are some errors I’ve seen:
Unexpected token < in JSON at position 1
Unexpected token p in JSON at position 0
Unexpected token d in JSON at position 0
4.
With fetch, you can use res.text() instead of res.json() to get the text string itself. Alter your code to read something like this, And check the console to see what’s causing the problem:
first prints out the return value. If you’re using fetch, you can use res.text() instead of res.json() to get the string. Convert your code to something like this and look at the print to see what went wrong.
fetch(‘ /users’)
/. Then (res =>; res.json()) // comment this out for now
.then(res => res.text()) // convert to plain text
.then(text => Console. log(text)) // Then log it out
Note that methods like res.json() and res.text() are asynchronous. So you can’t print out their return values directly, which is why console.log must be inside the parentheses of.then.
5. Is it the server?
server returns HTML instead of JSON for several reasons:
The requested URL does not exist. The server returns the 404 page as HTML. You may have code errors in the request (like /user instead of /users), or errors in the server code.
When a new route is added, the server needs to be restarted. Get (‘ /users’,…) : app.get(‘ /users’…) Route, but without a restart, the server will not respond to the new route address.
client proxies are not set: If you are using a Webpack Dev server like the Create React App, you can set a proxies that point to the back-end server.
API root URL is /. If you are using proxies through Webpack or the Create React App, make sure your API route is not at the root level /. This will confuse the proxy server and you will get an HTML return instead of your API request. You can put a prefix like/API/in front of such as.
is a 404 page?(This may be a missing address or a mistyped code).
Is this the page for index.html?(It could be a missing address or an agent configuration error)
If everything looks good (new address, the server doesn’t restart), and then restart the front-end and back-end server, see if problem solved italic style * *
from: https://segmentfault.com/a/1190000017545154
JS error: unexpected token u in JSON at position 0

JSON.parse is used somewhere, but the argument passed in is not a qualified JSON string.
Parse parse parse parse parse parse parse parse parse parse
Parse before you judge
Come from:
https://www.cnblogs.com/yangxunwu1992/p/8964780.html
Fatal error in PHP project: class’ redis’ not found
Reason 1: The PHP extension php_redis is not installed.
Reason 2: For Windows, pay attention to the PHP version (5.4, 5.6, 7.0) and compilation type (x86, x64)
Php_redis download address: http://pecl.php.net/package/redis
You can view the PHP version and compilation type using the phpinfo function

PHP:Fatal error: Class ‘COM’ not found in … How to deal with the problem
In thinkphp5, we encountered the problem of class’ phpoffice / phpspredsheet / spreadsheet ‘not found
When you’re using Excel import and export and you’re using PHPSpreadsheet you’re going to use Composer,
composer require phpoffice/phpspreadsheet
In fact, when you compose your PHPSpreadsheet, you should never move it. This will cause problems with your paths and everything
Composer down you don’t move and don’t copy the file, can appear otherwise Class ‘PhpOffice \ PhpSpreadsheet \ Spreadsheet’ not found this problem

Anything circled in red should not be moved or copied
Class ‘PHPWord_Writer_Word2003‘ not found
Question:
Error in using PHPword to generate word:
Fatal error: Uncaught error: Class ‘PHPWord_Writer_Word2003’ not found in D:\ phpStudy_Pro \WWW\newword\ phpWord \ phpWord \ iofactory.php :110 Stack trace: #0 D:\ phpStudy_Pro \WWW\newword\ DEMO (132): PHPWord_IOFactory::createWriter(Object(PHPWord), ‘Word2003’) #1 {main} Thrown in D:\ phpStudy_Pro \WWW\newword\ PHPWord\ PHPWord\ PHPWord\ iofactory.php on line 110

Solutions:
The word version that should be used with you is concerned, I change Word2003 here 2007 can be used normally!

— — the END — —
CONDA creating virtual environment and common CONDA commands
Conda creates a virtual environment
1, what is a virtual environment
it is a virtualization, independent from computer hacked out of the environment. Commonly speaking, virtual environment is to use virtual machine Docker to independent part of the content, we call this part of independent things “container”, in this container, we can only install the dependent packages we need, each container is isolated from each other, do not affect each other.
2, why want to use a virtual environment
in the actual project development, we usually according to their own requirements to download all sorts of corresponding framework library, such as Scrapy, Beautiful Soup, etc., but may each project USES the framework of library is not the same, or using a framework version is different, so we need to according to the demand constantly update, or uninstall the corresponding libraries. Working directly with our Python environment can cause a lot of unnecessary hassle for our development environment and project, and can be quite confusing to manage. Like the following scene:
Scenario 1: Project A requires version 1.0 of A framework, and project B requires version 2.0 of the library. If the virtual environment is not installed, then when you use the two projects, you will have to uninstall back and forth, which can easily cause errors in your project.
Scenario 2: Your company’s previous projects need to run in Python 2.7, and your project needs to run in Python 3. If you do not use the virtual environment, you may not be able to use both projects at the same time. If you use Python 3, your company’s previous projects may not be able to run, and your new projects may have trouble running. If the virtual environment can configure different runtimes for the two projects, then both projects can run at the same time.
Second, conda common commands
in the Anaconda conda can be understood as a tool, is also an executable commands, its core function is package management and environmental management. Therefore, the virtual environment to create, delete and other operations need to use the conda command.
1. Create a virtual environment
conda create-n env_name numpy matplotlib python=2.7 # Conda create -n env_name numpy matplotlib python=2.7 #
2. Activate the virtual environment
Linux: source activate your_env_name
Windows: activate your_env_name
tivate root
p>n –version Check if the current Python version is the one you want.
3. Exit the virtual environment
Linux: Conda deactivate your_env_name
Windows: deactivate env_name
4. Remove the virtual environment
Conda remove-n your_env_name(virtual environment name) — ALL
Delete packages from virtual environment:
Conda remove –name $your_env_name $package_name
6. Share the environment
conda env export > environment.yml
7. Create the environment from the YML file
conda env create -f environment.yml
Conda install package_name
(4). Conda install package_name
(4). Conda install package_name
(4). Conda install package_name
(4).
(5). Conda update conda: Check to update the current conda.
(5)
Could not launch “” Domain: IDEDebugSessionErrorDomain Code: 3 Failure Rea
Xcode error:
Could not launch “” Domain: IDEDebugSessionErrorDomain Code: 3 Failure Rea
before test has been on the iPhone, after changed the error as above.
Reason:
did not trust its own description management account when debugging a new device for the first time.
The solution:
in the description of the management and trust his account.
Python judge perfect square number
— coding: utf-8 —
# # Integer-coding:
+ 100 + 268 is a perfect square
# + coding: utf-8 —
#
from math import sqrt
def f(number):
for x in range(0,number):
m=sqrt(x+100)
n=sqrt(x+268)
if mint(m) and nint(n):
print x
If name = = “main” :
f (1000).
Running results:
21
261
[Python] error syntax error: summary of solutions to invalid syntax
Today, I learned Python, but I had a problem at the beginning. The code was perfectly fine, but every time I ran it, it showed “SyntaxError: Invalid Syntax”.
“SyntaxError: invalid syntax” means “mark> syntax error mark>;
after query solved the problem, so concluded a solution to this question:
- version problem: mark>
because python2 and python3 are incompatible, so some can run on python2 code can not run on python3; You can try to change versions; path problem: mark>
remember to take a closer look at your own path is correct; careless problem: br> f>t to add colon (:) at the end of if, elif, else, for, while, class,def declarations;
used = instead of ==; When installing third-party modules : mark>
when installing third-party modules is also likely to be “SyntaxError: invalid syntax” this problem, then need to check some is installed under the CMD window, at the same time, to the python installation directory, find PIP installation directory inside;
Solve the syntax error of Python PIP installation sys.stderr.write (f“ERROR: {exc}“)

br>