Trouble Adding Publishing Action to append to an existing big query table? - google-cloud-platform

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.

Related

UpdateContactFlowContent(): When I am trying to update the content, getting "InvalidRequestException"

UpdateContactFlowContent()
When I am trying to update the content, I am getting InvalidRequestException though I have done ARN mapping correctly. Replaced SourceARN with TargetARN. But still getting the error.
I have formatted the JSON to make it more readable. Whereas in actual I am using the exact JSON as it is output from DescribeContactFlow() in another instance.
I am unable to understand why I am getting this error and if I can check logs to find out exact error position.
"Version":"2019-10-30","StartAction":"4084e7ed-6467-4748-bf0a-c93955f06726","Metadata":{"entryPointPosition":{"x":14.4,"y":14.4},"ActionMetadata":{"fffa1a93-4c23-4ed2-a075-d2ff8382d33b":{"position":{"x":396.8,"y":686.4000000000001}},"4084e7ed-6467-4748-bf0a-c93955f06726":{"position":{"x":54.400000000000006,"y":312.8},"dynamicMetadata":{}},"29445da8-c159-4ed3-a32f-17e61086158d":{"position":{"x":720.8000000000001,"y":544.8000000000001}},"0116f219-faa4-4f40-926b-ae1b9eafbe8a":{"position":{"x":390.40000000000003,"y":181.60000000000002},"parameters":{"Attributes":{"isHoliday":{"useDynamic":true}}},"dynamicParams":["isHoliday"]},"2f869572-de59-477d-aaff-527c9569b530":{"position":{"x":1302.4,"y":520.8000000000001}},"1c946c7b-83b6-48af-8173-6cd4864462bf":{"position":{"x":1673.6000000000001,"y":530.4}},"8b84a239-3ab2-43fd-89f1-1ec0c5e31ee3":{"position":{"x":714.4000000000001,"y":76},"conditionMetadata":[{"id":"19b6f9cf-89c4-43d5-a1e9-22c21065eae2","operator":{"name":"Equals","value":"Equals","shortDisplay":"="},"value":"true"}]},"c6d7c6ca-b260-451a-a5a3-82c73da1e3a3":{"position":{"x":1269.6000000000001,"y":58.400000000000006}},"2afe0399-5abb-46a2-a55c-1bf09c88f72d":{"position":{"x":988,"y":-140.8},"parameters":{"ContactFlowId":{"displayName":"Rolando Test 3"}},"ContactFlow":{"text":"Rolando Test 3"}}}},"Actions":[{"Parameters":{"Text":"Error"},"Identifier":"fffa1a93-4c23-4ed2-a075-d2ff8382d33b","Type":"MessageParticipant","Transitions":{"NextAction":"1c946c7b-83b6-48af-8173-6cd4864462bf"}},{"Parameters":{"LambdaFunctionARN":"arn:aws:lambda:us-west-2:180398087396:function:holidaySchedule","InvocationTimeLimitSeconds":"3"},"Identifier":"4084e7ed-6467-4748-bf0a-c93955f06726","Type":"InvokeLambdaFunction","Transitions":{"NextAction":"0116f219-faa4-4f40-926b-ae1b9eafbe8a","Errors":[{"NextAction":"fffa1a93-4c23-4ed2-a075-d2ff8382d33b","ErrorType":"NoMatchingError"}]}},{"Parameters":{"Text":"Error 2"},"Identifier":"29445da8-c159-4ed3-a32f-17e61086158d","Type":"MessageParticipant","Transitions":{"NextAction":"8b84a239-3ab2-43fd-89f1-1ec0c5e31ee3"}},{"Parameters":{"Attributes":{"isHoliday":"$.External.isHoliday"}},"Identifier":"0116f219-faa4-4f40-926b-ae1b9eafbe8a","Type":"UpdateContactAttributes","Transitions":{"NextAction":"8b84a239-3ab2-43fd-89f1-1ec0c5e31ee3","Errors":[{"NextAction":"29445da8-c159-4ed3-a32f-17e61086158d","ErrorType":"NoMatchingError"}]}},{"Parameters":{"Text":"Its not a holiday. Get to work!!"},"Identifier":"2f869572-de59-477d-aaff-527c9569b530","Type":"MessageParticipant","Transitions":{"NextAction":"1c946c7b-83b6-48af-8173-6cd4864462bf"}},{"Parameters":{},"Identifier":"1c946c7b-83b6-48af-8173-6cd4864462bf","Type":"DisconnectParticipant","Transitions":{}},{"Parameters":{"ComparisonValue":"$.Attributes.isHoliday"},"Identifier":"8b84a239-3ab2-43fd-89f1-1ec0c5e31ee3","Type":"Compare","Transitions":{"NextAction":"2f869572-de59-477d-aaff-527c9569b530","Conditions":[{"NextAction":"2afe0399-5abb-46a2-a55c-1bf09c88f72d","Condition":{"Operator":"Equals","Operands":["true"]}}],"Errors":[{"NextAction":"2f869572-de59-477d-aaff-527c9569b530","ErrorType":"NoMatchingCondition"}]}},{"Parameters":{"Text":"Its a Holiday!!!!!"},"Identifier":"c6d7c6ca-b260-451a-a5a3-82c73da1e3a3","Type":"MessageParticipant","Transitions":{"NextAction":"1c946c7b-83b6-48af-8173-6cd4864462bf"}},{"Parameters":{"ContactFlowId":"arn:aws:connect:us-west-2:180398087396:instance/xxxxxxxxxxxxxxxxxx/contact-flow/xxxxxxxxxxxxxxxxxxx"},"Identifier":"2afe0399-5abb-46a2-a55c-1bf09c88f72d","Type":"TransferToFlow","Transitions":{"NextAction":"c6d7c6ca-b260-451a-a5a3-82c73da1e3a3","Errors":[{"NextAction":"c6d7c6ca-b260-451a-a5a3-82c73da1e3a3","ErrorType":"NoMatchingError"}]}}]

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]

Getting error: "The content-type is not JSON compatible" after a period of time

I'm not really sure exactly how long it takes before I get this error, but after a period of time, I get "The content-type is not JSON compatible" error. I am able the query just fine from graphql playground but not in my app. I am using persisted queries, so not sure if that is the cause.
The only fix is to restart my app.
Here is the
stacktrace
Based on the stacktrace you posted I can see that the server (in particular, probably the resolver for whatever query/mutation you are sending) is returning something unexpected i.e. not "JSON compatible".
Based on what you provided, that's all I can say. Please add more details and I can provide additional help. Just including the stacktrace is not enough to determine the cause of this issue.

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!