From 843d69d93727df5744d08f230567b66f8f24e367 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sat, 3 Jul 2021 15:09:04 +0200 Subject: [PATCH 1/5] Added evaluations community to foretold fetcher. Fixed small bug in wrapper --- src/platforms/foretold-fetch.js | 2 +- src/utils/mongo-wrapper.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/foretold-fetch.js b/src/platforms/foretold-fetch.js index f8fe931..1ecd312 100644 --- a/src/platforms/foretold-fetch.js +++ b/src/platforms/foretold-fetch.js @@ -6,7 +6,7 @@ import { upsert } from "../utils/mongo-wrapper.js" /* Definitions */ let graphQLendpoint = "https://api.foretold.io/graphql" -let highQualityCommunities = ["0104d8e8-07e4-464b-8b32-74ef22b49f21", "c47c6bc8-2c9b-4a83-9583-d1ed80a40fa2", "cf663021-f87f-4632-ad82-962d889a2d39", "47ff5c49-9c20-4f3d-bd57-1897c35cd42d"] +let highQualityCommunities = ["0104d8e8-07e4-464b-8b32-74ef22b49f21", "c47c6bc8-2c9b-4a83-9583-d1ed80a40fa2", "cf663021-f87f-4632-ad82-962d889a2d39", "47ff5c49-9c20-4f3d-bd57-1897c35cd42d", "b2412a1d-0aa4-4e37-a12a-0aca9e440a96"] /* Support functions */ async function fetchAllCommunityQuestions(communityId) { diff --git a/src/utils/mongo-wrapper.js b/src/utils/mongo-wrapper.js index e319e23..1555ca6 100644 --- a/src/utils/mongo-wrapper.js +++ b/src/utils/mongo-wrapper.js @@ -185,4 +185,4 @@ export async function mongoGetAllElements(databaseName = "metaforecastDatabase", } //mongoGetAllElements() -//mongoGetAllElements("metaforecastDatabase", "metaforecastHistory") \ No newline at end of file +//mongoGetAllElements("metaforecastDatabase", "metaforecastHistory") From c46c0242a24c564701dfb9675e442bcfcb42e4de Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 4 Jul 2021 23:37:08 +0200 Subject: [PATCH 2/5] fix: Case where GJO/CSET-foretelll cookies are outdated and the program enters an infinite loop is now fixed. --- src/platforms/csetforetell-fetch.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platforms/csetforetell-fetch.js b/src/platforms/csetforetell-fetch.js index 50115e7..60b61c7 100644 --- a/src/platforms/csetforetell-fetch.js +++ b/src/platforms/csetforetell-fetch.js @@ -126,6 +126,10 @@ async function fetchStats(questionUrl, cookie){ } function isEnd(html){ + if(html.includes("You need to sign in or sign up before continuing")){ + throw Error("You need to sign in or sign up before continuing") + } + let isEndBool = html.includes("No questions match your filter") if(isEndBool){ //console.log(html) From 87db98ec45f42c8d6de3b1c604dd79994c6a672a Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Mon, 5 Jul 2021 00:01:09 +0200 Subject: [PATCH 3/5] fix: Added more detection of whether I'm not logged in to CSET-foretell; it turns out that the first page of questions is shown even if not logged in. --- src/platforms/csetforetell-fetch.js | 6 + src/platforms/goodjudmentopen-fetch.js | 3 + temp.txt | 4377 ++++++++++++++++++++++++ 3 files changed, 4386 insertions(+) create mode 100644 temp.txt diff --git a/src/platforms/csetforetell-fetch.js b/src/platforms/csetforetell-fetch.js index 60b61c7..15b8239 100644 --- a/src/platforms/csetforetell-fetch.js +++ b/src/platforms/csetforetell-fetch.js @@ -45,6 +45,10 @@ async function fetchStats(questionUrl, cookie){ .then(res => res.data) //console.log(response) + if(response.includes("Sign up or sign in to forecast")){ + throw Error("Not logged in") + } + // Is binary? let isbinary = response.includes("binary?":true") // console.log(`is binary? ${isbinary}`) @@ -104,6 +108,8 @@ async function fetchStats(questionUrl, cookie){ let description = descriptionprocessed8 // Number of forecasts + console.log(response) + console.log(response.split("prediction_sets_count":")[1]) let numforecasts = response.split("prediction_sets_count":")[1].split(",")[0] // console.log(numforecasts) diff --git a/src/platforms/goodjudmentopen-fetch.js b/src/platforms/goodjudmentopen-fetch.js index a062c19..5728a98 100644 --- a/src/platforms/goodjudmentopen-fetch.js +++ b/src/platforms/goodjudmentopen-fetch.js @@ -108,6 +108,9 @@ async function fetchStats(questionUrl, cookie) { } function isEnd(html) { + if(html.includes("You need to sign in or sign up before continuing")){ + throw Error("You need to sign in or sign up before continuing") + } return html.includes("No questions match your filter") } diff --git a/temp.txt b/temp.txt new file mode 100644 index 0000000..618d37d --- /dev/null +++ b/temp.txt @@ -0,0 +1,4377 @@ + + + + +================================ +STARTING UP +================================ + + + + + + +**************************** +coupcast +**************************** +Initial try +Downloaded 2329 records. +Got cookie: mongo... +**************************** + + +**************************** +csetforetell +**************************** +Initial try +Got cookie: _cset... +1 +https://www.cset-foretell.com/questions?page=1 +Connected correctly to server +IsEnd? false +Updating document coupcast-questions in collection metaforecastCollection in database metaforecastDatabase with approximate size 0.3 MB +Sample: +[ + { + "title": "Will there be a coup in Afghanistan in the next month (as of 7/2021)?", + "url": "https://www.oneearthfuture.org/activities/coup-cast", + "platform": "CoupCast", + "description": ". The current leader of Afghanistan is Ashraf Ghani, who has been in power for 6.9 years. Afghanistan has a presidential regime type which has lasted for 7 years", + "options": [ + { + "name": "Yes", + "probability": "0.0003884", + "type": "PROBABILITY" + }, + { + "name": "No", + "probability": 0.9996116, + "type": "PROBABILITY" + } + ], + "timestamp": "2021-07-04T21:50:51.547Z", + "qualityindicators": { + "stars": 2 + }, + "extra": { + "country_name": "Afghanistan", + "regime_type": "Presidential", + "month": "7", + "year": "2021", + "leader_name": "Ashraf Ghani", + "month_risk": "0.0003884", + "annual_risk": "0.0083593", + "risk_change_percent": "0", + "regime_years": "7", + "leader_years": "6.916667", + "country_code": "AFG", + "country_abb": "AFG" + } + } +] +Done + + + + + + + + + + + + + + + + CSET Foretell + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
 
+ + +
+ + + +
+ + + + +
+ + + + +
+ Question + 1 + of + 27 + +
+ +
+ + +
+ + +
+
+
+ + Started + + + Jun 24, 2021 05:00PM UTC + + +   •   + + Closing + + + Aug 01, 2021 03:59AM UTC + + +
+ + +

Will the Chinese People's Liberation Army (PLA) seize control of any Taiwanese-occupied features in the South China Sea between August 1, 2021 and March 31, 2022?

+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ Topics +
+ +
+ + U.S.-China +   + +
+ +
+
+
+ + +
+

Related questions. A version of this question asking about the chance of conflict before July 1, 2021 recently closed. You can view those forecasts here.

Context. Tensions between Taiwan and China have been particularly high (CFR, BBC). China had previously aimed for peaceful reunification with Taiwan. In May 2020, Chinese Premier Li Keqiang dropped the term “peaceful” from a speech, apparently reflecting shifting policies on the island (Reuters). Throughout 2020, China has stepped up activities in the East and South China Sea (Al Jazeera, IISS) with some media reporting of an imminent invasion of Taiwan (Express, Forbes). 

In the Annual Report to Congress, the the Office of the Secretary of Defense state that an invasion of Taiwan would be a “significant political and military risk” but “China could launch an invasion of small Taiwan-occupied islands in the South China Sea such as Pratas or Itu Aba” (Department of Defense). In August 2020, the People’s Liberation Army (PLA) conducted military exercises off the Pratas islands to “simulate seizing the Pratas Islands” (Taipei Times). 

Foreign Policy assessed an invasion of Taiwan by China was unlikely, while The Diplomat suggests China’s military activity represents the end state of a failed strategy, not an imminent attack. Taiwan’s current features include the Pratas Islands and Itu Aba Island (CSIS). The control of a feature in the South China Sea would indicate a serious escalation within the region. 

Resolution details. The outcome of this question will be determined by reputable media reporting or official statements. Seizing would involve an invasion, conquest, and control of a feature by Chinese military forces, lasting more than 24 hours. The question will resolve once control has been held for 24 hours, irrespective of how long that control is maintained after that period. 

Why does this question close so soon? We will soon implement a new rolling-risk format on Foretell. Questions of this form will ask about the likelihood of an event within a set period of time, e.g., six months. Such questions could remain active indefinitely. When that format is available, this question will be re-published in that format.

***

To suggest a change or clarification to this question, please select Request Clarification from the green gear-shaped dropdown button to the right of the question.

+
+ + +
+ +
+
+ + + + + + + + + + + +
NameProbability
Yes8%
+
+
+

Sign up or sign in to forecast!

+ Sign Up + Sign In +
+
+ + + +
+ + +
+ + + + + + + +
+ +
+ +
+ +
+
+ + + +
+ + +
+ Tip: Mention someone by typing @username +
+
+ +
+ + Cancel +
+
+ + + + + + +undefined +TypeError: Cannot read property 'split' of undefined + at fetchStats (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:109:71) + at processTicksAndRejections (node:internal/process/task_queues:94:5) + at async csetforetell_inner (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:178:24) + at async applyIfCookieExists (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/getCookies.js:20:9) + at async csetforetell (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:227:3) + at async tryCatchTryAgain (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:28:9) + at async doEverything (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:61:9) +We encountered some error when fetching the URL: https://www.cset-foretell.com/questions/164-will-the-chinese-people-s-liberation-army-pla-seize-control-of-any-taiwanese-occupied-features-in-the-south-china-sea-between-august-1-2021-and-march-31-2022, so it won't appear on the final json + + + + + + + + + + + + + + + + CSET Foretell + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
 
+ + +
+ + + +
+ + + + +
+ + + + + + +
+ Question + 2 + of + 27 + +
+ +
+ + +
+ + +
+
+
+ + Started + + + Jun 24, 2021 05:00PM UTC + + +   •   + + Closing + + + Jan 01, 2022 04:59AM UTC + + +
+ + +

Following El Salvador, will another country classify Bitcoin as legal tender by December 31, 2021?

+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ + +
+

Context. On June 9, 2021, the president of El Salvador, Nayib Bukele, announced that the Salvadoran Congress had voted to make Bitcoin legal tender. Legal tender is money that courts of law are required to recognize as satisfactory payment for a monetary debt. 

Making cryptocurrencies, such as Bitcoin, legal tender has several benefits for developing countries without sophisticated financial systems. For one, it makes their economy less vulnerable to inflation caused by the actions of other country's central banks. Bukele cited recent actions by the U.S. Federal Reserve as one of the motivations for El Salvador's new law. Second, it makes it easier to send money without having a bank account. El Salvadorans living outside the country sent $5.92 billion to friends and family in El Salvador in 2020. According to Bukele, "a big chunk of those 6 billion dollars is lost to intermediaries." Third, it makes their economy more attractive to crypto entrepreneurs. 

There are risks, however. According to The Independent, "Speculation within bitcoin forums and among crypto commentators on Twitter is that the US could target El Salvador with sanctions, as it represents a threat to the strength of the US dollar - the other official currency of the country. One way to potentially mitigate against this risk would be for countries that accept bitcoin as legal tender to form an economic alliance."

Paraguay and Panama appear closest to making Bitcoin legal tender, with politicians in both countries claiming they will introduce legislation similar to El Savador's. The Independent states that "elected officials in Argentina, Brazil, Mexico and Nicaragua have all spoken favourably about bitcoin, with some pledging to introduce legislation that is favourable to cryptocurrencies."

Resolution details. This question resolves based on popular media reporting that a country other than El Salvador has taken the legal steps necessary to make Bitcoin legal tender. The question resolves positively if the legal steps, such as legislative approval of a new law, are completed by December 31, 2021, even if the law would not go into effect until a later date.

***

This question was proposed by Mauricio_B. 

To suggest a change or clarification to this question, please select Request Clarification from the green gear-shaped dropdown button to the right of the question.

+
+ + +
+ +
+
+ + + + + + + + + + + +
NameProbability
Yes38%
+
+
+

Sign up or sign in to forecast!

+ Sign Up + Sign In +
+
+ + + +
+ + +
+ + + + + + + +
+ +
+ +
+ +
+
+ + + +
+ + +
+ Tip: Mention someone by typing @username +
+
+ +
+ + Cancel +
+
+ + + + + + +undefined +TypeError: Cannot read property 'split' of undefined + at fetchStats (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:109:71) + at processTicksAndRejections (node:internal/process/task_queues:94:5) + at async csetforetell_inner (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:178:24) + at async applyIfCookieExists (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/getCookies.js:20:9) + at async csetforetell (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:227:3) + at async tryCatchTryAgain (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:28:9) + at async doEverything (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:61:9) +We encountered some error when fetching the URL: https://www.cset-foretell.com/questions/163-following-el-salvador-will-another-country-classify-bitcoin-as-legal-tender-by-december-31-2021, so it won't appear on the final json + + + + + + + + + + + + + + + + CSET Foretell + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
 
+ + +
+ + + +
+ + + + +
+ + + + + + +
+ Question + 3 + of + 27 + +
+ +
+ + +
+ + +
+
+
+ + Started + + + Jun 24, 2021 05:00PM UTC + + +   •   + + Closing + + + Aug 01, 2021 03:59AM UTC + + +
+ + +

Will the World Health Organization declare a new Public Health Emergency of International Concern between August 1, 2021 and July 31, 2022?

+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ + +
+

Context. The International Health Regulations (2005) empower the World Health Organization (WHO) to declare Public Health Emergency of International Concern (PHEIC), defined as "an extraordinary event which is determined to constitute a public health risk to other States through the international spread of disease and to potentially require a coordinated international response." An IHR Emergency Committee comprising a panel of experts advises the WHO Director-General on potential PHEICs. The WHO Director-General makes the final determination of whether to declare a PHEIC.

Since 2007, the WHO has made six PHEIC declarations: the 2009 H1N1 influenza pandemic, Ebola (West African outbreak 2013–2015, outbreak in Democratic Republic of Congo 2018–2020), poliomyelitis (2014 to present), Zika (2016) and COVID-19 (2020 to present).

Resolution details. This question resolves based on an official declaration by the WHO. 

Why does this question close so soon? We will soon implement a new rolling-risk format on Foretell. Questions of this form will ask about the likelihood of an event within a set period of time, e.g., 12 months. Such questions could remain active indefinitely. When that format is available, this question will be re-published in that format.

***

This question was proposed by P Alex Demarsh (palexd).

To suggest a change or clarification to this question, please select Request Clarification from the green gear-shaped dropdown button to the right of the question.

+
+ + +
+ +
+
+ + + + + + + + + + + +
NameProbability
Yes44%
+
+
+

Sign up or sign in to forecast!

+ Sign Up + Sign In +
+
+ + + +
+ + +
+ + + + + + + +
+ +
+ +
+ +
+
+ + + +
+ + +
+ Tip: Mention someone by typing @username +
+
+ +
+ + Cancel +
+
+ + + + + + +undefined +TypeError: Cannot read property 'split' of undefined + at fetchStats (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:109:71) + at processTicksAndRejections (node:internal/process/task_queues:94:5) + at async csetforetell_inner (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:178:24) + at async applyIfCookieExists (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/getCookies.js:20:9) + at async csetforetell (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:227:3) + at async tryCatchTryAgain (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:28:9) + at async doEverything (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:61:9) +We encountered some error when fetching the URL: https://www.cset-foretell.com/questions/162-will-the-world-health-organization-declare-a-new-public-health-emergency-of-international-concern-between-august-1-2021-and-august-1-2022, so it won't appear on the final json + + + + + + + + + + + + + + + + CSET Foretell + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
 
+ + +
+ + + +
+ + + + +
+ + + + + + +
+ Question + 4 + of + 27 + +
+ +
+ + +
+ + +
+
+
+ + Started + + + Jun 14, 2021 11:00AM UTC + + +   •   + + Closing + + + Oct 01, 2021 05:59PM UTC + + +
+ + +

[Experimental] What will be the consensus crowd forecast on October 1, 2021, on whether COVID-19 originated in a lab in Wuhan, China?

+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ Topics +
+ +
+ + U.S.-China +   + +
+ +
+
+
+ + +
+

Note on this question. This question is part of a pair of experimental questions. Its sister question asks about forecasters' genuine beliefs about the origin of COVID-19. That question will not be scored. Its purpose is to serve as a ground truth to be forecasted in this question. The sister question will be scored. Its purpose is to elicit forecasts about the crowd consensus for the sister question on October 1, 2021.

We recognize that the pair of questions can be gamed by providing disingenuous forecasts on the sister question to improve one's score on this question. We kindly ask that forecasters not do that. 

Related question. Related questions are on Metaculus and Hypermind.

Context. The leading hypotheses for the origin of COVID-19 are (i) animal-to-human transmission, and (ii) a leak from the Wuhan Institute of Virology ("lab-leak theory"). Two Chinese researchers stated in a paper in February 2020 that the virus likely originated in a lab in Wuhan, China. The lab-leak theory also had champions within conservative circles in the United States. The World Health Organization dismissed the lab-leak theory, however, and -- as reported by the New York Times -- the apparent politicization of the theory in the U.S. created a "fake bubble of consensus" among scientists and the media against the theory (quoting Matthew Yglesias).

The lab-leak theory is now receiving renewed attention. On May 14, 2021,18 scientists stated in a letter to the Journal of Science that the lab-leak theory is "viable." Other scientists have recently come out as less dismissive of the lab-leak theory. And on May 27, President Biden asked the U.S. intelligence community to investigate the lab-leak theory and report back to him in 90 days. (See also Washington Post timeline on how the lab-leak theory became credible.)

Resolution details. This question will resolve based on the consensus crowd forecast of its sister question as of closing, at 11:59 ET on October 1, 2021. The consensus crowd forecast is always shown under "Crowd Forecast" button. It's the mean of the 68% most-recent forecasts. The bins are up to but not including the upper boundary, meaning, for example, in the unlikely event the consensus forecast is exactly 30%, the 30%-40% bin will be correct. Foretell staff reserve the right to omit forecasts when calculating the crowd consensus if we have reason to believe they were made in bad faith. In such a case, we will communicate to forecasters that we are omitting forecasts, and the effect on the consensus forecast, as soon as we are aware of the problem.

Why are we asking these questions? If we will never know the ground truth for a question, we cannot score it in the conventional manner. Many questions of this form are of great interest, however. A new method for scoring unresolvable questions -- called "reciprocal scoring" -- treats the crowd consensus as the ground truth and scores forecasters based on how close their forecasts are to the crowd consensus. See Karger, Monrad, Mellers, Tetlock, "Accelerating the Evaluation of Policy Options in Crises: The COVID-19 Pandemic" [Forthcoming]. For a similar method, see Hypermind's Drip Rewards.

For this pair of questions, we're treating the crowd consensus on October 1, 2021 as the ground truth. This question is effectively asking two questions: (i) what new information about the origins of COVID-19 do you expect to be available by October 1, 2021, and (ii) what impact do you expect it will have on the consensus view of the crowd.

***

To suggest a change or clarification to this question, please select Request Clarification from the green gear-shaped dropdown button to the right of the question.

 

+
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameProbability
0-10%8%
10-20%10%
20-30%16%
30-40%23%
40-50%17%
50-60%13%
60-70%7%
70-80%3%
80-90%2%
90-100%1%
+
+
+

Sign up or sign in to forecast!

+ Sign Up + Sign In +
+
+ + + +
+ + +
+ + + + + + + +
+ +
+ +
+ +
+
+ + + +
+ + +
+ Tip: Mention someone by typing @username +
+
+ +
+ + Cancel +
+
+ + + + + + +undefined +TypeError: Cannot read property 'split' of undefined + at fetchStats (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:109:71) + at processTicksAndRejections (node:internal/process/task_queues:94:5) + at async csetforetell_inner (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:178:24) + at async applyIfCookieExists (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/getCookies.js:20:9) + at async csetforetell (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:227:3) + at async tryCatchTryAgain (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:28:9) + at async doEverything (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:61:9) +We encountered some error when fetching the URL: https://www.cset-foretell.com/questions/155-experimental-what-will-be-the-median-foretell-forecast-on-whether-covid-19-originated-in-a-lab-in-wuhan-china-on-october-1-2021, so it won't appear on the final json + + + + + + + + + + + + + + + + CSET Foretell + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
 
+ + +
+ + + +
+ + + + +
+ + + + + + +
+ Question + 5 + of + 27 + +
+ +
+ + +
+ + +
+
+
+ + Started + + + Jun 14, 2021 11:00AM UTC + + +   •   + + Closing + + + Oct 01, 2021 05:59PM UTC + + +
+ + +

[Experimental] Did COVID-19 originate in a lab in Wuhan, China?

+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ Topics +
+ +
+ + U.S.-China +   + +
+ +
+
+
+ + +
+

Note on this question. This question is part of a pair of experimental questions. This question will not be scored. Its purpose is to elicit forecasters' genuine beliefs. The sister question will be scored. Its purpose is to elicit forecasts about the crowd consensus for this question on October 1, 2021.

We recognize that the pair of questions can be gamed by providing disingenuous forecasts on this question to improve your score on the sister question. We kindly ask that forecasters not do that. 

Related questions. Related questions are on Metaculus and Hypermind.

Context. The leading hypotheses for the origin of COVID-19 are (i) animal-to-human transmission, and (ii) a leak from the Wuhan Institute of Virology ("lab-leak theory"). Two Chinese researchers stated in a paper in February 2020 that the virus likely originated in a lab in Wuhan, China. The lab-leak theory also had champions within conservative circles in the United States. The World Health Organization dismissed the lab-leak theory, however, and -- as reported by the New York Times -- the apparent politicization of the theory in the U.S. created a "fake bubble of consensus" among scientists and the media against the theory (quoting Matthew Yglesias).

The lab-leak theory is now receiving renewed attention. On May 14, 2021,18 scientists stated in a letter to the Journal of Science that the lab-leak theory is "viable." Other scientists have recently come out as less dismissive of the lab-leak theory. And on May 27, President Biden asked the U.S. intelligence community to investigate the lab-leak theory and report back to him in 90 days. (See also Washington Post timeline on how the lab-leak theory became credible.)

Resolution details. As noted above, this question will not resolve. Its purpose is to serve as a ground truth for its sister question. 

Why are we asking these questions? If we will never know the ground truth for a question, we cannot score it in the conventional manner. Many questions of this form are of great interest, however. A new method for scoring unresolvable questions -- called "reciprocal scoring" -- treats the crowd consensus as the ground truth and scores forecasters based on how close their forecasts are to the crowd consensus. See Karger, Monrad, Mellers, Tetlock, "Accelerating the Evaluation of Policy Options in Crises: The COVID-19 Pandemic" [Forthcoming]. For a similar method, see Hypermind's Drip Rewards.

For this pair of questions, we're treating the crowd consensus on October 1, 2021 as the ground truth. The sister question is effectively asking two questions: (i) what new information about the origins of COVID-19 do you expect to be available by October 1, 2021, and (ii) what impact do you expect it will have on the consensus view of the crowd.

***

To suggest a change or clarification to this question, please select Request Clarification from the green gear-shaped dropdown button to the right of the question.

 

+
+ + +
+ +
+
+ + + + + + + + + + + +
NameProbability
Yes35%
+
+
+

Sign up or sign in to forecast!

+ Sign Up + Sign In +
+
+ + + +
+ + +
+ + + + + + + +
+ +
+ +
+ +
+
+ + + +
+ + +
+ Tip: Mention someone by typing @username +
+
+ +
+ + Cancel +
+
+ + + + + + +undefined +TypeError: Cannot read property 'split' of undefined + at fetchStats (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:109:71) + at processTicksAndRejections (node:internal/process/task_queues:94:5) + at async csetforetell_inner (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:178:24) + at async applyIfCookieExists (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/getCookies.js:20:9) + at async csetforetell (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:227:3) + at async tryCatchTryAgain (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:28:9) + at async doEverything (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:61:9) +We encountered some error when fetching the URL: https://www.cset-foretell.com/questions/154-experimental-did-covid-19-originate-in-a-lab-in-wuhan-china, so it won't appear on the final json + + + + + + + + + + + + + + + + CSET Foretell + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
 
+ + +
+ + + +
+ + + + +
+ + + + + + +
+ Question + 6 + of + 27 + +
+ +
+ + +
+ + +
+
+
+ + Started + + + Jun 07, 2021 11:45AM UTC + + +   •   + + Closing + + + Nov 07, 2022 11:59PM UTC + + +
+ + +

Will the Democratic Party maintain its majority in the U.S. House of Representatives after the midterm elections in 2022?

+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ + +
+

Related questions. You can view similar questions on PredictIt and Smarkets

Context. All 435 seats in the U.S. House of Representatives will be contested at the upcoming U.S. midterm elections, to be held on November 8, 2022. The Democratic Party has had a majority in the House since the 2018 midterm elections, when they held 235 seats. The Democratic Party's majority was reduced to 222 seats after the 2020 elections. Since 2020, three seats held by Democrats have been vacated: Ohio 11; New Mexico 1; and Florida 20. A Democrat won the New Mexico 1 special election; the Ohio 11 and Florida 20 special elections will be held on November 2, 2021, and January 11, 2022, respectively. 

The New York Time's FiveThirtyEight blog provides ongoing analysis of relevant historical and polling data. For example, since 1946, the president's party has lost an average 27 House seats.

Resolution details. A candidate will be considered a Democrat if they are formally affiliated with the Democratic Party in the election, or if they have publicly stated that they intend to caucus with the Democratic Party. Determination of the election outcome will based on popular media reporting if the result is reasonably unambiguous. If the outcome is initially reasonably ambiguous, determination of the election outcome will be based on state election authority certification, or other official state determination. If the outcome is unclear for any other reasons, including contestation of the results, Foretell staff will determine at their discretion when, and on what basis, to resolve this question.

***

This question was proposed by Vanessa Pineda (username: vpsays).

To suggest a change or clarification to this question, please select Request Clarification from the green gear-shaped dropdown button to the right of the question.

+
+ + +
+ +
+
+ + + + + + + + + + + +
NameProbability
Yes40%
+
+
+

Sign up or sign in to forecast!

+ Sign Up + Sign In +
+
+ + + +
+ + +
+ + + + + + + +
+ +
+ +
+ +
+
+ + + +
+ + +
+ Tip: Mention someone by typing @username +
+
+ +
+ + Cancel +
+
+ + + + + + +undefined +TypeError: Cannot read property 'split' of undefined + at fetchStats (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:109:71) + at processTicksAndRejections (node:internal/process/task_queues:94:5) + at async csetforetell_inner (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:178:24) + at async applyIfCookieExists (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/getCookies.js:20:9) + at async csetforetell (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:227:3) + at async tryCatchTryAgain (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:28:9) + at async doEverything (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:61:9) +We encountered some error when fetching the URL: https://www.cset-foretell.com/questions/150-will-the-democratic-party-maintain-its-majority-in-the-u-s-house-of-representatives-after-the-midterm-elections-in-2022, so it won't appear on the final json + + + + + + + + + + + + + + + + CSET Foretell + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
 
+ + +
+ + + +
+ + + + +
+ + + + + + +
+ Question + 7 + of + 27 + +
+ +
+ + +
+ + +
+
+
+ + Started + + + May 20, 2021 08:00PM UTC + + +   •   + + Closing + + + Feb 28, 2022 11:59PM UTC + + +
+ + +

What will the 'Big 5' (Alphabet, Amazon, Apple, Facebook, and Microsoft) tech companies' average reputation ranking be in the 2022 Axios Harris poll?

+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ Topics +
+ +
+ + Industry +   + + Public Attitudes +   + +
+ +
+
+
+ + +
+

Context. According to the Axios Harris Poll's recently released 2021 Corporate Reputation Rankings, the reputation of big tech companies has taken a "pandemic plunge." Among the Big 5 tech companies -- Amazon, Apple, Facebook, Google, and Microsoft -- Amazon remains at the top at #10 (out of 100), and Facebook remains at the bottom at #98 (out of 100). Between those two extremes, Microsoft and Google's rankings dropped significantly since 2020. Only Apple's ranking improved between 2020 and 2021, from #27 to #16 (out of 100).

Data and resolution details. This question resolves based on the results of the 2022 Axios Harris Poll. Based on the publication schedule of previous polls, we expect the 2022 poll to be released between February and July 2022.

The Axios Harris poll describes its methodology as follows: "The Axios Harris Poll 100 is based on a survey of 42,935 Americans in a nationally representative sample. The two-step process starts fresh each year by surveying the public’s top-of-mind awareness of companies that either excel or falter in society. These 100 'most visible companies' are then rated by a second group of Americans across the seven key dimensions of reputation to determine the ranking. If a company is not on the list, it did not reach a critical level of visibility to be measured."

Note on reading the graph: The x-axis is the average company ranking out of 100. That means a higher number = a worse reputation. 

+

The data underlying the graph is here.

This question was proposed by Foretell pro forecaster Anthony Cordetti (username: ACordetti).

To suggest a change or clarification to this question, please select Request Clarification from the green gear-shaped dropdown button to the right of the question.

+
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameProbability
Less than 30 (good reputation)9%
Between 30 and 40, inclusive23%
More than 40 but less than or equal to 5035%
More than 50 but less than or equal to 6024%
More than 60 (bad reputation)9%
+
+
+

Sign up or sign in to forecast!

+ Sign Up + Sign In +
+
+ + + +
+ + +
+ + + + + + + +
+ +
+ +
+ +
+
+ + + +
+ + +
+ Tip: Mention someone by typing @username +
+
+ +
+ + Cancel +
+
+ + + + + + +undefined +TypeError: Cannot read property 'split' of undefined + at fetchStats (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:109:71) + at processTicksAndRejections (node:internal/process/task_queues:94:5) + at async csetforetell_inner (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:178:24) + at async applyIfCookieExists (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/getCookies.js:20:9) + at async csetforetell (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:227:3) + at async tryCatchTryAgain (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:28:9) + at async doEverything (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:61:9) +We encountered some error when fetching the URL: https://www.cset-foretell.com/questions/141-what-will-the-big-5-tech-companies-average-reputation-ranking-be-in-the-2022-harris-poll, so it won't appear on the final json + + + + + + + + + + + + + + + + CSET Foretell + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
 
+ + +
+ + + +
+ + + + +
+ + + + + + +
+ Question + 8 + of + 27 + +
+ +
+ + +
+ + +
+
+
+ + Started + + + May 17, 2021 01:30PM UTC + + +   •   + + Closing + + + Dec 31, 2021 11:59PM UTC + + +
+ + +

What percentage of U.S. AI publications will have a Chinese co-author in 2022?

+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ Topics +
+ +
+ + U.S.-China +   + + Research +   + +
+ +
+
+
+ + +
+

Related question. A version of this question was previously issued for 2021. You can view those forecasts here. The median crowd forecast for 2021 is 18.4%.

Context. As U.S.-China tensions increase, policymakers are paying greater attention to areas in which the two countries are entangled. One such area relevant to tech-security policy is AI research collaborations. To date, the U.S.-China decoupling trends apparent in economic and immigration data do not appear to be impacting research collaborations. Whether potential conflicts between academic and security interests will begin to affect research collaborations is unclear.

Data and resolution details. This question resolves based on Dimensions data. We classified publications as AI/ML-relevant or not using a predictive model trained on arXiv publication data, where a publication is relevant if it’s categorized on arXiv under any of artificial intelligence, machine learning, computer vision, computation and language, multiagent systems, or robotics. To read more about this method, see “Identifying the Development and Application of Artificial Intelligence in Scientific Text.” A publication is a U.S. publication if any author is affiliated with a U.S.-based organization. A publication is a U.S.-China collaboration if at least one author is affiliated with a U.S.-based organization and at least one author is affiliated with a China-based organization.

The data for 2021 in the graph below is incomplete and will be updated over the course of the year.

+ + +

The graph is linked directly to data from the vendor. Values on the graph can change if the vendor updates the data in ways that impact past data points. The data underlying the graph on the date the question was published is here. If the data changes to a non-trivial extent, we will notify forecasters and add a new snapshot of the data to the spreadsheet to make it easier to view the changes. 

    +

To suggest a change or clarification to this question, please select Request Clarification from the green gear-shaped dropdown button to the right of the question.

+
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameProbability
Less than 14%10%
Between 14% and 16%, inclusive15%
More than 16% but less than or equal to 18%30%
More than 18% but less than or equal to 20%31%
More than 20%14%
+
+
+

Sign up or sign in to forecast!

+ Sign Up + Sign In +
+
+ + + +
+ + +
+ + + + + + + +
+ +
+ +
+ +
+
+ + + +
+ + +
+ Tip: Mention someone by typing @username +
+
+ +
+ + Cancel +
+
+ + + + + + +undefined +TypeError: Cannot read property 'split' of undefined + at fetchStats (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:109:71) + at processTicksAndRejections (node:internal/process/task_queues:94:5) + at async csetforetell_inner (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:178:24) + at async applyIfCookieExists (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/getCookies.js:20:9) + at async csetforetell (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:227:3) + at async tryCatchTryAgain (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:28:9) + at async doEverything (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:61:9) +We encountered some error when fetching the URL: https://www.cset-foretell.com/questions/134-what-percentage-of-u-s-ai-publications-will-have-a-chinese-co-author-in-2022, so it won't appear on the final json + + + + + + + + + + + + + + + + CSET Foretell + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
 
+ + +
+ + + +
+ + + + +
+ + + + + + +
+ Question + 9 + of + 27 + +
+ +
+ + +
+ + +
+
+
+ + Started + + + May 12, 2021 11:00AM UTC + + +   •   + + Closing + + + Dec 31, 2021 11:59PM UTC + + +
+ + +

What percentage of U.S. corporate press releases about AI will reference AI ethics in 2022?

+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ Topics +
+ +
+ + Industry +   + +
+ +
+
+
+ + +
+

Related question. A version of this question was previously issued for 2021. You can view those forecasts here. The median crowd forecast for 2021 is 5%.

Data and resolution details. This question is based on data from the Nexis Metabase (2021), a corpus of global news articles on a variety of topics. The question is limited to press releases by companies that Nexis categorizes as corporate and located in the United States. A press release is on the topic of AI if it mentions the term "artificial intelligence" or "machine learning"; and it's on the topic of AI ethics if it also mentions either "ethics," "bias," fairness," or any variant of those terms. 

The data for 2021 in the graph below is incomplete and will be updated over the course of the year.

+ +

The graph is linked directly to data from the vendor. Values on the graph can change if the vendor updates the data in ways that impact past data points. The data underlying the graph on the date the question was published is here. If the data changes to a non-trivial extent, we will notify forecasters and add a new snapshot of the data to the spreadsheet to make it easier to view the changes. 

To suggest a change or clarification to this question, please select Request Clarification from the green gear-shaped dropdown button to the right of the question.

+
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameProbability
Less than 2%8%
Between 2% and 4%, inclusive24%
More than 4% but less than or equal to 6%32%
More than 6% but less than or equal to 8%22%
More than 8%15%
+
+
+

Sign up or sign in to forecast!

+ Sign Up + Sign In +
+
+ + + +
+ + +
+ + + + + + + +
+ +
+ +
+ +
+
+ + + +
+ + +
+ Tip: Mention someone by typing @username +
+
+ +
+ + Cancel +
+
+ + + + + + +undefined +TypeError: Cannot read property 'split' of undefined + at fetchStats (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:109:71) + at processTicksAndRejections (node:internal/process/task_queues:94:5) + at async csetforetell_inner (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:178:24) + at async applyIfCookieExists (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/getCookies.js:20:9) + at async csetforetell (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:227:3) + at async tryCatchTryAgain (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:28:9) + at async doEverything (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:61:9) +We encountered some error when fetching the URL: https://www.cset-foretell.com/questions/132-what-percentage-of-u-s-corporate-press-releases-about-ai-will-reference-ai-ethics-in-2022, so it won't appear on the final json + + + + + + + + + + + + + + + + CSET Foretell + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
 
+ + +
+ + + +
+ + + + +
+ + + + + + +
+ Question + 10 + of + 27 + +
+ +
+ + +
+ + +
+
+
+ + Started + + + Apr 20, 2021 12:20PM UTC + + +   •   + + Closing + + + Jan 01, 2022 04:59AM UTC + + +
+ + +

What will be the value, in dollars, of U.S. exports of semiconductor manufacturing equipment to China in 2022?

+ +
+
+
+ +
+ + +
+ +
+ Tags +
+ +
+ + semiconductors +   + +
+ +
+ Topics +
+ +
+ + U.S.-China +   + + Industry +   + +
+ +
+
+
+ + +
+

Related questions. This question is part of a cluster that includes U.S. exports of semiconductor chips to China, Chinese imports of semiconductor chips, and Chinese imports of semiconductor manufacturing equipment. A version of this question was previously issued for the first half of 2021 but was voided due to a data error. 

Context. The semiconductor manufacturing process has many components manufactured through complicated, highly globalized supply chains. China's ability to produce advanced semiconductor chips is particularly dependent on U.S., Japanese, and Dutch imports of advanced semiconductor manufacturing equipment (SME) -- i.e., the tools used by chip factories to make chips. Although China is building up its chip manufacturing capacity using imported SME, it is still reliant on imports for most of the semiconductor chips it consumes. China is especially reliant on the United States, Taiwan, and South Korea for imports of the most advanced semiconductor chips. Therefore, export controls on chips could reduce China's access to them. If China cannot import SME, it will remain dependent on imports for chips. This question focuses on SME. The United States is considering a number of actions that would reduce the export of SME to China. 

Data and resolution details. This question resolves based on United Nations Comtrade data. We classified exports as SME if they have any of the following Harmonized System (HS) codes 8486, 903082, 903141, 854311, 901041. 

+

The data underlying the graph is here.

This question is a metric for the following scenario:

To suggest a change or clarification to this question, please select Request Clarification from the green gear-shaped dropdown button to the right of the question.

+
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameProbability
Less than $5 billion4%
More than $5 billion but less than or equal to $6 billion15%
Between $6 billion and $7 billion, inclusive36%
Between $7 billion and $8 billion, inclusive28%
More than $8 billion16%
+
+
+

Sign up or sign in to forecast!

+ Sign Up + Sign In +
+
+ + + +
+ + +
+ + + + + + + +
+ +
+ +
+ +
+
+ + + +
+ + +
+ Tip: Mention someone by typing @username +
+
+ +
+ + Cancel +
+
+ + + + + + +undefined +TypeError: Cannot read property 'split' of undefined + at fetchStats (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:109:71) + at processTicksAndRejections (node:internal/process/task_queues:94:5) + at async csetforetell_inner (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:178:24) + at async applyIfCookieExists (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/getCookies.js:20:9) + at async csetforetell (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/platforms/csetforetell-fetch.js:227:3) + at async tryCatchTryAgain (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:28:9) + at async doEverything (file:///home/nuno/Documents/core/software/fresh/js/metaforecasts/metaforecasts-mongo/src/utils/doEverything.js:61:9) +We encountered some error when fetching the URL: https://www.cset-foretell.com/questions/131-what-will-be-the-value-in-dollars-of-u-s-exports-of-semiconductor-manufacturing-equipment-to-china-in-2022, so it won't appear on the final json +Sleeping for ~5secs so as to not be as noticeable to the cset-foretell servers + + + + +================================ +STARTING UP +================================ + + + + + + +**************************** +coupcast +**************************** +Initial try From d9390faeec680c8009c883b24bea506428a50c1c Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Fri, 9 Jul 2021 18:15:49 +0200 Subject: [PATCH 4/5] fix: Reworked logic to better deal with being logged out in CultivateLabs platforms --- src/platforms/csetforetell-fetch.js | 14 ++++++++++---- src/platforms/goodjudmentopen-fetch.js | 22 +++++++++++++++++----- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/platforms/csetforetell-fetch.js b/src/platforms/csetforetell-fetch.js index 15b8239..85a11d9 100644 --- a/src/platforms/csetforetell-fetch.js +++ b/src/platforms/csetforetell-fetch.js @@ -131,11 +131,17 @@ async function fetchStats(questionUrl, cookie){ return result } -function isEnd(html){ - if(html.includes("You need to sign in or sign up before continuing")){ - throw Error("You need to sign in or sign up before continuing") +function isNotSignedIn(html){ + + let isNotSignedInBool = html.includes("You need to sign in or sign up before continuing") || html.includes("Sign up") + if(isNotSignedInBool){ + console.log("Error: Not signed in.") } + console.log(`isNotSignedIn? ${isNotSignedInBool}`) + return isNotSignedInBool +} +function isEnd(html){ let isEndBool = html.includes("No questions match your filter") if(isEndBool){ //console.log(html) @@ -156,7 +162,7 @@ async function csetforetell_inner(cookie){ let results = [] let init = Date.now() // console.log("Downloading... This might take a couple of minutes. Results will be shown.") - while(!isEnd(response)){ + while(!isEnd(response) && !isNotSignedIn(response)){ let htmlLines = response.split("\n") let h4elements = htmlLines.filter(str => str.includes("
str.includes("
0){ + await upsert(results, "csetforetell-questions") + }else{ + console.log("Not updating results, as process was not signed in") + } let end = Date.now() let difference = end-init diff --git a/src/platforms/goodjudmentopen-fetch.js b/src/platforms/goodjudmentopen-fetch.js index c3b3f18..e0a7b09 100644 --- a/src/platforms/goodjudmentopen-fetch.js +++ b/src/platforms/goodjudmentopen-fetch.js @@ -188,7 +188,12 @@ async function goodjudgmentopen_inner(cookie) { } // let string = JSON.stringify(results, null, 2) // fs.writeFileSync('./data/goodjudmentopen-questions.json', string); - await upsert(results, "goodjudmentopen-questions") + + if(results.length > 0){ + await upsert(results, "goodjudmentopen-questions") + }else{ + console.log("Not updating results, as process was not signed in") + } let end = Date.now() let difference = end - init