Uncaught TypeError: Cannot read property 'calcOnDemand' of null - spreadjs

I'm getting this error when I click outside the spreadsheet, after creating a new blank file from the File tab
What is the problem in this?

Thank you for using SpreadJS.
It is difficult to know exactly what is going on based on your description. Do you have a simple code that you can share that replicates the issue.
Just in case, you can set the calcOnDemand option using spread.options.calcOnDemand = false; where spread is the name of your spreadJS instance.
Grapecity SpreadJS Team

Related

How can I fix the internal error in Django?

I don't have a lot of experience in Django and I am a fairly green developer. When I run the localhost I keep getting a Internal Error. I have tried most of the solutions to similar problems here and none of them works. Can anyone help me? The code is not mine so I don't want to alter it as such either.
Here is a picture of the errors I keep getting:
The only thing you can do without altering the code is to enter the value "shop_all_art" in the HomePage table in the database.
Do not share code via images. You should also share the related code.
Your stacktrace clearly says, that Python is not able to access first element of HomePage.objects.filter(value='shop_all_art') in file bidgala/bidgala/pages/views.py. all_art_img is most probably empty.
Looks like all_art_img is empty.
you should check if a Query has any elements before with a method such as
if all_art_img.exists():
all_art_img[0]

Power BI Embedded deleteVisual usage in a layout file

I am trying to use the await page.deleteVisual("8d0e01e7a860c2e5706d"); command when I layout a report page. This seems logical to me. I am going to place various visuals on the page for a certain group of people. For another group of people I will delete a few other visuals and keep this one. I get the following error:
TypeError: report.deleteVisual is not a function at changeLayout (PQLayout.js:56)
Most of the documentation pages are bare and lacking good examples, but this page doesn't help much for the error: https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/remove-visual
Thanks
deleteVisual is a method provided by the Page object but from the error it seems you are calling it for the report object. You should use page.deleteVisual("VISUAL_GUID") to delete the visual.
deleteVisual is a method of powerbi-report-authoring SDK.
You can refer to the live showcase to understand the usage of this SDK:
Live showcase: Quickly create and personalize visuals
Showcase's source code: https://github.com/microsoft/PowerBI-Embedded-Showcases/tree/main/Quickly%20create%20and%20personalize%20visuals
Docs: https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/remove-visual

Trouble Adding Publishing Action to append to an existing big query table?

I have a dataflow flow that appends to an existing bigquery table which has been working for the last few weeks. When i run it now it gives me the error "Cannot run job. Please reload the page and try again." and won't even start the job.
After trying a lot of things, i made a copy of the flow and when the publishing action is creating a new csv file, it works but when i try to
Add a publishing action to an existing big query table,it keeps giving me another bizarre error "SyntaxError: Unexpected token C in JSON at position 0".
I have no idea what is happening since everything used to work perfectly and i made no changes whatsoever.
I am not adding anything new, but I want to give you an answer.
It seems that one of your JSON inputs may be malformed. Try logging it to see what's the problem - and also try skipping malformed JSON strings.
As mentioned in past comments, I suggest to check your logs in StackDriver to find out why are you getting the:
"Cannot run job. Please reload the page and try again."
Also if you can retrieve more information about the error from those logs, It'd be useful to assist you further.
Besides the above, maybe we can solve this issue easier by only just checking the json format, here I put an easy third party json validator and here you can check where you have the error in your json.

SQL72007: The syntax check failed 'Unexpected end of file occurred.' in batch near :

In SSDT project (using VS2017/VS2015, SSDT version 15.1.61702.140), I cannot get my project to build. The compiler keeps complaining about the sql statement in my PostDeploymentScript (yes, I have set the BuildAction property to PostDeploy). The sql statement is:
if ('$(env)' = 'dvp')
BEGIN
PRINT 'creating users for dvp'
:r .\SecurityAdditions\usersdvp.sql
END
ELSE IF ('$(env)' = 'qat')
BEGIN
PRINT 'creating users for qat'
:r .\SecurityAdditions\usersqat.sql
END
The actual error message is:
D:\My\File\Path\PostDeploymentScript.sql (lineNum, col): Error: SQL72007:
The syntax check failed 'Unexpected end of file occurred.' in the batch near:
The line num referred in the error message in the last line (end). Any idea what's causing this?
Apparently the problem was due to the GO statements I had in the files I was referencing. Having GO statements inside if else block is invalid. Here is an article explaining that. I was able to get it work by removing all GO statements from the referenced files and by splitting if else to two if.
IF ('$(env)' = 'dvp')
BEGIN
:R .\SecurityAdditions\UsersDVP.sql
END
IF ('$(env)' = 'qat')
BEGIN
:R .\SecurityAdditions\UsersQAT.sql
END
GO
I had this same error because I forgot to end one of the scripts being included in the post deployment script with a GO statement. What makes it hard fix is that the error will point to the first line in the next script instead of the script where the GO statement is missing.
I ran into this issue while I was trying to create database users in a SQL Database project. Setting the build action to None is no use because then your script doesn't run during the deployment.
I was using a script like this to create the users:
IF NOT EXISTS (SELECT * FROM sys.sysusers WHERE name='$(DbUserName)')
BEGIN
CREATE USER [$(DbUserName)] WITH PASSWORD = '$(DbPassword)';
ALTER ROLE [db_owner] ADD MEMBER [$(DbUserName)];
END
I had two SQLCMD variables in the project file and setting a default value for one of them actually resolved the issue. It's really weird but I hope this helps some poor soul one day :)
I would like to share my experience here.
I got same error building my sql project but scenario was different and tricky.
I introduced new column in one of my database table and I needed to populate that column for already existing rows in that table. So basically it should be one time process and hence I decided to create post deployment script to do that. This post deployment script
began with IF condition to make sure it run only once for a given database. Please note this does not allow GO statement.
then Create Function to create temporary function. This needs GO statement before Create Function mainly because it makes changes in database schema. This was tricky because IF does not allow GO statement.
then Update query using temp function to achieve my requirement. This is fine without GO statement
then DROP FUNCTION to remove temporary function. This is also database schema change and ideally needs GO statement.
To handle this situation without any GO statement
I created a variable let's say '#CreateFuntion NAVARCHAR(MAX)' and set it with whole Create Function statement.
Executed Create Function using "EXEC sp_executesql #CreateFunction". This runs Create Function in separate batch. I was expecting Drop Function will need same treatment but in my case it worked without GO and "EXEC sp_executesql" may be because it was last statement in the script and would anyway run in next batch.
Everything else as it is
Another reason this could happen is if a post deployment script has a BEGIN statement without a corresponding END line. In such a case, any subsequent GO in anther future script will cause this error. I stumbled across this due to my own absent-mindedness when editing one of the post-deployment scripts.

Vtiger: I can't add a To Do event

If I got to calendar, click on To Do, then try to add an event, the form pops up, I fill it out, press save, but no Event gets added.
In the SQL error log's I see an error like this:
2011-09-29 14:57:07 EDT ERROR: null value in column "visibility" violates not-null constraint
2011-09-29 14:57:07 EDT STATEMENT: insert into
vtiger_activity(activityid,subject,date_start,time_start,time_end,due_date,status,eventstatus,priority,sendnotification,activitytype,visibility,duration_hours,duration_minutes,location,recurringtype,notime)
values('235','Testing','2011-09-29','19:50',NULL,'2011-09-29','Not Started',NULL,'High','0','Task',NULL,NULL,NULL,NULL,NULL,'0')
So, for some reason, it is trying to add a To-Do while inserting null values. My biggest problem is that I cannot locate the origin of the query. So, basically, the most important thing I am asking is what file takes the data that was input into the todosave form and turns it into a query.
I don't know if many people on here use Vtiger, but I couldn't figure this out so I went ahead and posted anyway. The official documentation is not very helpful in my opinion.
Thanks for everything, have a good day.
This might be an isolated case, but was any of the modules modified recently? In this case, I would assume that it would be the Calendar module. I've tested this on the demo website and on my vTiger installation and it works fine..
Perhaps you can download a fresh copy of vTiger and replace the modules/Calendar all its content.
By the way, another place to ask if you have any questions, is the vTiger forums.
http://forums.vtiger.com/index.php
Usually you can ask it in the Help - 5.2.1 section. Hope this helps!