尝试从JetBrains PyCharm控制台启动ipython笔记本会产生语法错误。我有Anaconda 3.4.0.0。和Python 3.5安装。
我不知道这是否适合论坛,并且很乐意将其删除或提供更多详细信息,具体取决于反馈。
这是错误消息:
$('#personNameField').select2();
$('#businessNameField').select2();
/* When a business is selected it then pulls all the associated customers and puts them into the customer name drop down list */
$("#businessNameField").change(function getAssociatedPeople() {
var sitePath = sitepath.sitePath;
var business_id = $("#businessNameField").val();
if (business_id == 'Choose a Company') {
$('#personNameField').val('Choose a Person').trigger('change');
}
else {
/* Location of the query script that pulls info from the database */
var url = myticketsscript.pluginsUrl + '/portal/public/includes/shortcodes/my-tickets/auto-complete/auto-complete.php';
$.get( url, { business_id: business_id, sitePath: sitePath } )
.done(function( data ) {
$('#personNameField').html('<option value="Choose a Person">Choose a Person</option>');
var results = jQuery.parseJSON(data);
console.log(data);
$(results).each(function(key, value) {
/* Add the data to the customer name drop down list */
$('#personNameField').append('<option id="customer_id" value="'+ value.id +'">' + value.first_name + ' ' + value.last_name + '</option>');
/* Logs the data in the console */
console.log(key);
console.log(value);
})
});
}
});
/* When a person is selected it then pulls all the associated business and puts it into the business name drop down list */
$("#personNameField").change(function() {
var customer_id = $("#personNameField").val();
var sitePath = sitepath.sitePath;
if (customer_id == 'Choose a Person') {
var url = myticketsscript.pluginsUrl + '/portal/public/includes/shortcodes/my-tickets/auto-complete/auto-complete.php';
$.get( url, { customer_list: customer_id, sitePath: sitePath } )
.done(function( data ) {
$('#businessNameField').val('Choose a Company').trigger('change');
$('#personNameField').html('<option value="Choose a Person">Choose a Person</option>');
var results = jQuery.parseJSON(data);
console.log(data);
$(results).each(function(key, value) {
/* Add the data to the customer name drop down list */
$('#personNameField').append('<option id="customer_id" value="'+ value.id +'">' + value.first_name + ' ' + value.last_name + '</option>');
/* Logs the data in the console */
console.log(key);
console.log(value);
})
});
}
else {
/* Location of the query script that pulls info from the database */
var url = myticketsscript.pluginsUrl + '/portal/public/includes/shortcodes/my-tickets/auto-complete/auto-complete.php';
$.get( url, { customer_id: customer_id, sitePath: sitePath } )
.done(function( data ) {
var results = jQuery.parseJSON(data);
console.log(data);
$(results).each(function(key, value) {
/* Selects the correct company for the customer selected */
$('#businessNameField').val(value.id).trigger('change');
console.log(key);
console.log(value);
})
});
}
});
这是我启动PyCharm时在控制台上打印的内容:
In[3]: ipython notebook
File "<ipython-input-3-c5fb5fabe56c>", line 1
ipython notebook
^
SyntaxError: invalid syntax