Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
I created an example with a very simple list (of countries) and created api routes based on the instructions found here: https://gist.github.com/JedWatson/9741171
server.js:
app.get('/api/countries', keystone.middleware.api, routes.api.countries.list);
routes/api/countries.js:
import keystone from 'keystone';
export function list(req, res) {
keystone.List('Country').model.find((err, items) => {
if (err) return res.apiError('database error', err);
res.apiResponse({
countries: items
});
});
}
I get the error Cannot read property 'find' of undefined, the List object exists but it doesn't have a model property. Does anyone know why this is? The keystone admin UI works as expected and there are several objects in the database.
The problem was that I used keystone.List (capitalized) instead of keystone.list. Hopefully someone else will be helped by this answer.
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I am trying to import a JSON file into a Single Vue Component and when I build, I get this error:
Module parse failed: Unexpected token } in JSON at position 1980 while parsing near '...647 25 49.981 25Z",
}
'
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
I am using Laravel Mix and see a webpack.config file at node_modules/laravel-mix/setup/webpack.config.js but there are no configurable options there.
I think you have an extra comma in the end of the json, please remove it and try again.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
I'm getting this error when trying to set a new map center using the Geocoder Api from Google Maps.
geocoder.geocode({adress:this.startPosition},
(results2,status)=>{
if(status=="OK"){
this.map.setCenter(results2[0].geometry.location)
alert(results2[0].geometry.location)
}else{
alert("Geocode was not sucessfull" + status)
}
});
where "startPosition" is a string with my location
Instead of adress, it should be address.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
lately the FIWARE Lab store doesn't seem to work for me. The first page with Top Rated and Latest offerings loads ok, but after clicking on widgets/mashups tab, it produces an error window:
get() returned more than one Purchase -- it returned 2! Lookup parameters
were {'customer': <django.utils.functional.SimpleLazyObject object at
0x7fd9e41a3750>, 'organization_owned': False, 'offering': <Offering: EntityService>}
Also, when trying to publish a widget, after choosing to upload to the FIWARE Lab Store, the POST request to https://mashup.lab.fiware.org/api/markets/publish fails with code 502 and the following response:
{"description": "Something went wrong (see details for more info)",
"details": {"FIWARE Lab": "Unexpected response from Store"}}
I know that some software components have been updated lately so I understand that this might be a transitional bug. Thanks for your help if you can fix it.
As you pointed, that was a temporal problem. You should be able to use the Store portal again.
Anyway, StackOverflow is for asking questions related to programming (visit the help center for more info), so it's better to use the contact info published on the FIWARE catalogue or the fiware-lab-help#lists.fiware.org for this kind of questions/support.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I want to remove a line or a text from my application settings .
example: My.Settings.Bookmarks.
here is information in my settings of Bookmarks:
Name: Bookmarks | Type: System.Collections.Specialized.StringCollection | Scope: User.
Can anyone help me please because it's important
Here from MSDN
StringCollection.Remove
StringCollection.RemoveAt
The first one requires the string to remove, the second one the index of the string in the collection.
Suppose to have
StringCollection sCol = new StringCollection();
sCol.Add("STEVE");
sCol.Add("JOHN");
sCol.Remove("STEVE");
Really simple
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I am attempting to get all tweets fro a specific user with a hashtag. The url I am using is:
https://api.twitter.com/1/statuses/user_timeline.json?q=%23jdmr%2Bfrom%3ABarrySpang
which without the URL encoding is simply: https://api.twitter.com/1/statuses/user_timeline.json?q=#jdmr+from:BarrySpang
When I try it in twitter search (as stated in the API docs) and it displays the desired results, however when I try the above URL I get a 401 response with this error message: {"request":"/1/statuses/user_timeline.json?q=%23jdmr%2Bfrom%3ABarrySpang","error":"Not authorized"}
Please can you advise me on this
statuses/user_timeline doesn't have q parameter
You should be using search: https://api.twitter.com/1/search.json?q=%23jdmr%2Bfrom%3ABarrySpang
I just received the same error when running python-twitter's GetFollowers() method on a user account that had been suspended. If others receive the same error, it might pay to check whether the account you're trying to access still exists.