Let's say that I have a number of URL strings and I want to extract 'meaningful' information from. Namely, I want to know what is the page which that url specifies. So if the site is subaru.com, did this come from the about page, special deals page, etc.
[1] "http://www.subaru.com/vehicles/impreza/index.html"
[2] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=214495e6-dbe0-6668-9222-00003d7cd876&prid=87&k_affcode=76602"
[3] "http://www.subaru.com/index.html?s_kwcid=subaru models&k_clickid=3ec14630-aa7f-b968-c389-00003e9a93f9&prid=87&k_affcode=77236"
[4] "http://www.subaru.com/customer-support.html"
[5] "http://www.subaru.com/"
[6] "http://www.subaru.com/vehicles/forester/index.html"
[7] "http://www.subaru.com/auto-show/detroit-2014.html"
[8] "http://www.subaruofchampaigncounty.com/index.htm"
[9] "http://www.subaru.com/build-your-own/impreza.html?zip=92106"
[10] "http://www.subaru.com/mobile/index.html"
[11] "http://www.subaru.com/"
[12] "http://www.subaru.com/"
[13] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=2361a001-195a-29c8-7323-00003c593714&prid=87&k_affcode=76602"
[14] "http://www.subaru.ru/index"
[15] "http://www.subarugeorgetown.com/certified/subaru/2013-subaru-outback-georgetown-tx-1b523a570a0a00de63937097e2f3723d.htm"
[16] "http://www.subaru.com/"
[17] "http://www.subaru.com/?s_kwcid=suburau&k_clickid=41a2c6dc-c9fa-6ac8-9bf0-000044fe28d7&prid=87&k_affcode=2966&gclid=cprrlygp-rscfugs7aodbkiaaw"
[18] "http://www.subaru.com/mobile/index.html"
[19] "http://www.subaru.com/mobile/index.html"
[20] "http://www.subaru.com/enthusiasts/index.html"
[21] "http://www.subaru.ru/index"
[22] "http://www.subaru.ru/index"
[23] "http://www.subaru.com/mobile/index.html"
[24] "http://www.subaru.com/"
[25] "http://www.subaru.com/"
[26] "http://www.subaru.com/"
[27] "http://www.subaru.com/enthusiasts/index.html"
[28] "http://www.subaruofdayton.com/tcd/home/?tcdkwid=22194961&tcdcmpid=19148&tcdadid=6852747105&locale=en_us"
[29] "http://www.subaru.com/build-your-own/outback.html?sc_brochure=subaru.outback.2014-specifications"
[30] "http://www.subaruofatlanta.com/featured-vehicles/used.htm?reset=inventorylisting"
[31] "http://www.subaru.com/customer-support.html"
[32] "http://www.subarupacific.com/index.htm?cikw=+subaru&cimt=b&cipl=&cinetwork=search&ciagaid=49620691888&gclid=clhf0uoq-rscffpm7aodtv0aiw"
[33] "http://www.subaru.ru/index"
[34] "http://www.subaru.ru/lineup/forester/spec/spec"
[35] "http://www.subaru.com/build-your-own/forester.html?zip=37211"
[36] "http://www.subaru.com/mobile/index.html"
[37] "http://www.subaruelcajon.com/index.htm"
[38] "http://www.subaru.com/customer-support.html"
[39] "http://www.subaru.com/vehicles/brz/index.html?s_kwcid=brz&k_clickid=1ec224f1-18c6-a228-5afb-000047ecef67&prid=87&k_affcode=197257&gclid=cpik35-r-rscfrsffgodhk4ajg"
[40] "http://www.subaru.com/mobile/index.html"
[41] "http://www.subaru.com/mobile/index.html"
[42] "http://www.subaru.ru/index"
[43] "http://www.subaru.com/"
[44] "http://www.subaru.com/vehicles/xv-crosstrek/index.html"
[45] "http://www.subaru.com/customer-support.html"
[46] "http://www.subaru.com/mobile/index.html"
[47] "http://www.subaru.ru/index"
[48] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=293d9ff9-a1ad-8489-82d3-00001e3a514f&prid=87&k_affcode=76602"
[49] "http://www.subaruofkingsautomall.com/index.htm"
[50] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=5ed77da1-f786-55e9-02d1-000055d135fc&prid=87&k_affcode=76602"
[51] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=1645e9d9-05b5-1fe8-d2b1-00002a3ce9e8&prid=87&k_affcode=76602"
[52] "https://www.subaru.com/my-subaru/account.html"
[53] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=0c0e3142-706d-4cc8-830f-00001ba63c96&prid=87&k_affcode=76602"
[54] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=3a594c6a-4485-d2c9-aabf-000051bdfc1d&prid=87&k_affcode=76602"
[55] "http://www.subaru.com/"
[56] "http://www.subaru.com/customer-support.html"
[57] "http://www.subaru.com/build-your-own/index.html"
[58] "http://www.subaru.com/"
[59] "http://www.subaru.com/mobile/index.html"
[60] "http://www.subaru.com/vehicles/brz/photos-videos.html?site=370595&placement=96106620&ad=7514606&creative=0"
[61] "http://www.subaru.com/customer-support.html"
[62] "http://www.subaru.com/"
[63] "http://www.subaru.com/"
[64] "http://www.subaru.com/customer-support.html"
[65] "http://www.subaru.com/mobile/index.html"
[66] "http://www.subaru.com/mobile/index.html"
[67] "http://www.subaru.com/"
[68] "http://www.subaru.com/mobile/index.html"
[69] "http://www.subaru.com/build-your-own/impreza.html?zip=01504"
[70] "http://www.subaru.com/enthusiasts/badge-of-ownership/index.html"
[71] "http://www.subaru.com/"
[72] "http://www.subaru.com/mobile/index.html"
[73] "http://www.subaruofcolumbia.com/used-inventory/index.htm"
[74] "http://www.subaru.com/customer-support.html"
[75] "http://www.subaru.com/"
[76] "http://www.subaruofpuyallup.com/tcd/home/?tcdkwid=22163386&tcdcmpid=13971&tcdadid=35753423988&locale=en_us"
[77] "http://www.subaru.com/mobile/vehicles/forester/index.html"
[78] "http://www.subaru.com/mobile/index.html"
[79] "http://www.subaru.com/"
[80] "http://www.subaru.com/"
As you can see, there's no specific rule I can use to extract just one thing from the URL string because each is different. Furthermore, notice that some have an extension of .ru and not .com. Right now, I've put together the following code but I still want to extract the page (xv-crosstrek, customer-support, etc)
mydat$URL_One <- gsub(".*www\\.([[:alpha:]]+\\.com).*","\\1", mydat$URL)
mydat$URL_Two <- gsub(".*\\.com","", mydat$URL)
Can anyone help with this task?
I'm thinking that I may want to remove all incidents of /index in each URL string.
So for some examples.
before:
"http://www.subaru.com/vehicles/forester/index.html"
after:
forester
before:
http://www.subaruofcolumbia.com/used-inventory/index.htm
after:
used-inventory
before:
http://www.subaru.com/build-your-own/forester.html?zip=37211
after:
build-your-own
There's the httr package, which has the function parse_url. For example, you can do
<r> parse_url("http://www.subaru.com/vehicles/forester/index.html")
$scheme
[1] "http"
$hostname
[1] "www.subaru.com"
$port
NULL
$path
[1] "vehicles/forester/index.html"
$query
NULL
$params
NULL
$fragment
NULL
$username
NULL
$password
NULL
attr(,"class")
[1] "url"
Which perhaps gets you part of the way there.
R has two handy functions for this. basename returns the basename of a url, while dirname returns the directory name (or path). Taking urls to be your first ten urls, I think we can achieve the results you're looking for with the following.
> urls
# [1] "http://www.subaru.com/vehicles/impreza/index.html"
# [2] "http://www.subaru.com/index.html?s_kwcid=subaru&k_clickid=214495e6-dbe0-6668-9222-00003d7cd876&prid=87&k_affcode=76602"
# [3] "http://www.subaru.com/index.html?s_kwcid=subaru models&k_clickid=3ec14630-aa7f-b968-c389-00003e9a93f9&prid=87&k_affcode=77236"
# [4] "http://www.subaru.com/customer-support.html"
# [5] "http://www.subaru.com/"
# [6] "http://www.subaru.com/vehicles/forester/index.html"
# [7] "http://www.subaru.com/auto-show/detroit-2014.html"
# [8] "http://www.subaruofchampaigncounty.com/index.htm"
# [9] "http://www.subaru.com/build-your-own/impreza.html?zip=92106"
# [10] "http://www.subaru.com/mobile/index.html"
> ifelse(grepl('index|zip', basename(urls)),
gsub('^.*/', '', dirname(urls)),
gsub('\\.html', '', basename(urls)))
# [1] "impreza" "www.subaru.com"
# [3] "www.subaru.com" "customer-support"
# [5] "www.subaru.com" "forester"
# [7] "detroit-2014" "www.subaruofchampaigncounty.com"
# [9] "build-your-own" "mobile"
Related
This is my project: https://github.com/dade1987/StockPricePrediction
I deployed it in Heroku but i can't see my homepage on this link: https://price-predictor-eu.herokuapp.com/
I see it locally.
Heroku says:
2020-06-27T10:33:17.545687+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=price-predictor-eu.herokuapp.com request_id=be6efc89-ba70-4ba8-bb4e-26b85ccce869 fwd="151.36.107.145" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
I tried to do it too:
webpack-dev-server route
✖ 「wdm」: Hash: 6575b1f5bc373f461724
Version: webpack 4.28.4
Time: 5599ms
Built at: 06/27/2020 2:53:13 PM
1 asset
Entrypoint main = bundle.js
[0] (webpack)-dev-server/client/clients/SockJSClient.js 4.06 KiB {0} [built]
[2] (webpack)-dev-server/client/utils/log.js 964 bytes {0} [built]
[3] multi (webpack)-dev-server/client?http://0.0.0.0:8080 route 40 bytes {0} [built]
[4] (webpack)-dev-server/client?http://0.0.0.0:8080 4.29 KiB {0} [built]
[5] ./node_modules/strip-ansi/index.js 161 bytes {0} [built]
[6] ./node_modules/ansi-regex/index.js 135 bytes {0} [built]
[7] (webpack)-dev-server/client/socket.js 1.53 KiB {0} [built]
[10] (webpack)-dev-server/client/overlay.js 3.51 KiB {0} [built]
[11] ./node_modules/ansi-html/index.js 4.16 KiB {0} [built]
[12] ./node_modules/html-entities/lib/index.js 449 bytes {0} [built]
[16] ./node_modules/loglevel/lib/loglevel.js 8.41 KiB {0} [built]
[17] (webpack)-dev-server/client/utils/sendMessage.js 402 bytes {0} [built]
[18] (webpack)-dev-server/client/utils/reloadApp.js 1.59 KiB {0} [built]
[21] (webpack)-dev-server/client/utils/createSocketUrl.js 2.91 KiB {0} [built]
[30] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {0} [built]
+ 17 hidden modules
ERROR in Entry module not found: Error: Can't resolve 'route' in '/app'
ERROR in multi (webpack)-dev-server/client?http://0.0.0.0:8080 route
Module not found: Error: Can't resolve 'route' in '/app'
# multi (webpack)-dev-server/client?http://0.0.0.0:8080 route main[1]
Where is my error? I am not very expert in node.
Thank you
I have an older version of code written in 2017 using React.
Getting this error while running npm run start. Not to sure if it is node version related.
Using node v: 10.16.2
$ npm run start
> starter-kit-react#0.0.1 start C:\xampp\htdocs\react\tool-master
> webpack-dev-server --host 0.0.0.0 --port 8080
C:\xampp\htdocs\react\tool-master\webpack.config.babel.js:4
import { resolve } from 'path';
^
SyntaxError: Unexpected token {
at Module._compile (internal/modules/cjs/loader.js:723:23)
at loader (C:\xampp\htdocs\react\tool-master\node_modules\babel-register\lib\node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (C:\xampp\htdocs\react\tool-master\node_modules\babel-register\lib\node.js:154:7)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at requireConfig (C:\xampp\htdocs\react\tool-master\node_modules\webpack\bin\convert-argv.js:96:18)
at C:\xampp\htdocs\react\tool-master\node_modules\webpack\bin\convert-argv.js:109:17
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! starter-kit-react#0.0.1 start: `webpack-dev-server --host 0.0.0.0 --port 8080`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the starter-kit-react#0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Roaming\npm-cache\_logs\2019-08-08T00_15_37_258Z-debug.log
I was able to go past this step after upgrading babel
Babel Upgrade details here
However, now I am stuck where code is showing the below error. Initially it showed the processing went well and then stuck at some syntax error. Not sure what it is.
render(
<Provider store={store}>
<ContentProvider lang="en">
<App />
</ContentProvider>
</Provider>,
document.getElementById('app')
);
Error shown below:
$ yarn start
yarn run v1.17.3
$ webpack-dev-server --host 0.0.0.0 --port 8080
Project is running at http://0.0.0.0:8080/
webpack output is served from /
Hash: b06107c62fb824ae192d
Version: webpack 2.7.0
Time: 498ms
Asset Size Chunks Chunk Names
vendor.e33c4b5498769f380132.js 326 kB 0 [emitted] [big] vendor
app.955a9ae9e538a29c3be3.js 2.58 kB 1 [emitted] app
manifest.58eaa606281aa83df76a.js 6.07 kB 2 [emitted] manifest
vendor.e33c4b5498769f380132.js.map 387 kB 0 [emitted] vendor
app.955a9ae9e538a29c3be3.js.map 104 bytes 1 [emitted] app
manifest.58eaa606281aa83df76a.js.map 6.17 kB 2 [emitted] manifest
index.html 126 bytes [emitted]
chunk {0} vendor.e33c4b5498769f380132.js, vendor.e33c4b5498769f380132.js.map (vendor) 323 kB {2} [initial] [rendered]
[3] (webpack)-dev-server/client?http://0.0.0.0:8080 7.93 kB {0} [built]
[4] ./~/ansi-html/index.js 4.26 kB {0} [built]
[5] ./~/ansi-regex/index.js 135 bytes {0} [built]
[6] ./~/html-entities/index.js 231 bytes {0} [built]
[9] ./~/loglevel/lib/loglevel.js 7.86 kB {0} [built]
[10] ./~/node-libs-browser/~/events/events.js 13.6 kB {0} [built]
[11] ./~/node-libs-browser/~/punycode/punycode.js 14.7 kB {0} [built]
[15] ./~/sockjs-client/dist/sockjs.js 181 kB {0} [built]
[16] ./~/strip-ansi/index.js 161 bytes {0} [built]
[17] ./~/url/url.js 23.3 kB {0} [built]
[18] ./~/url/util.js 314 bytes {0} [built]
[19] (webpack)-dev-server/client/overlay.js 3.67 kB {0} [built]
[20] (webpack)-dev-server/client/socket.js 1.08 kB {0} [built]
[22] (webpack)/hot nonrecursive ^\.\/log$ 160 bytes {0} [built]
[23] (webpack)/hot/emitter.js 77 bytes {0} [built]
+ 8 hidden modules
chunk {1} app.955a9ae9e538a29c3be3.js, app.955a9ae9e538a29c3be3.js.map (app) 2.34 kB {0} [initial] [rendered]
[2] ./src/index.jsx 2.3 kB {1} [built] [failed] [1 error]
[24] multi (webpack)-dev-server/client?http://0.0.0.0:8080 ./src/index 40 bytes {1} [built]
chunk {2} manifest.58eaa606281aa83df76a.js, manifest.58eaa606281aa83df76a.js.map (manifest) 0 bytes [entry] [rendered]
ERROR in ./src/index.jsx
Module build failed: SyntaxError: C:\xampp\htdocs\react\tool-master\src\index.jsx: Unexpected token (18:2)
16 |
17 | render(
> 18 | <Provider store={store}>
| ^
19 | <ContentProvider lang="en">
20 | <App />
21 | </ContentProvider>
at Parser.raise (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:6325:17)
at Parser.unexpected (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:7642:16)
at Parser.parseExprAtom (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8841:20)
at Parser.parseExprSubscripts (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8412:23)
at Parser.parseMaybeUnary (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8392:21)
at Parser.parseExprOps (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8267:23)
at Parser.parseMaybeConditional (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8240:23)
at Parser.parseMaybeAssign (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8187:21)
at Parser.parseExprListItem (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:9491:18)
at Parser.parseCallExpressionArguments (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8621:22)
at Parser.parseSubscript (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8514:29)
at Parser.parseSubscripts (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8433:19)
at Parser.parseExprSubscripts (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8422:17)
at Parser.parseMaybeUnary (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8392:21)
at Parser.parseExprOps (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8267:23)
at Parser.parseMaybeConditional (C:\xampp\htdocs\react\tool-master\node_modules\#babel\parser\lib\index.js:8240:23)
# multi (webpack)-dev-server/client?http://0.0.0.0:8080 ./src/index
Child html-webpack-plugin for "index.html":
chunk {0} index.html 542 kB [entry] [rendered]
[0] ./~/lodash/lodash.js 541 kB {0} [built]
[1] ./~/html-webpack-plugin/lib/loader.js!./~/html-webpack-plugin/default_index.ejs 538 bytes {0} [built]
[2] (webpack)/buildin/global.js 509 bytes {0} [built]
[3] (webpack)/buildin/module.js 517 bytes {0} [built]
webpack: Failed to compile.
Hi everyone, I am trying to implement PACT JS. Currently I am referring to this implementation :
npm install (or yarn install) and the consumer side command (mocha app/client/spec/PostServiceClient.spec.js) worked well.The pact file was generated.
But the provider side command (node app/service/spec/PostService.spec.js) failed.It's seemed due to the localhost server. But i didn't succeed in running the server. It missed 'THREE' module.
After adding 'THREE' module, i couldn't compile the build. So 2 files are missing in the repository main.js and Template.html (--> webpack.config.js).
And i didn't succeed in posting a comment in Lucas M Blog (http://hecodes.com/2016/10/better-testing-microservices-using-consumer-driven-contracts-node-js/)
Could someone help me?
Wilson Mahann
Thanks a lot for your help
Error messages trying to run the server
$ yarn server
yarn run v1.9.4
$ webpack-dev-server --host 0.0.0.0 --config webpack.config.js --devtool eval --progress --hot --inline
module.js:550
throw err;
^
Error: Cannot find module 'three'
at Function.Module._resolveFilename (module.js:548:15)
at Function.resolve (internal/module.js:18:19)
at Object. (D:\Workspace\pact-js\js00\pact-node-example-master\webpack.config.js:34:31)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at module.exports (D:\Workspace\pact-js\js00\pact-node-example-master\node_modules\webpack\bin\convert-argv.js:80:13)
at Object. (D:\Workspace\pact-js\js00\pact-node-example-master\node_modules\webpack-dev-server\bin\webpack-dev-server.js:68:48)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
So I had successfully the missing module "three" : yarn add three
And run the server
$ yarn server
yarn run v1.9.4
$ webpack-dev-server --host 0.0.0.0 --config webpack.config.js --devtool eval --progress --hot --inline
clean-webpack-plugin: D:\Workspace\pact-js\js00\pact-node-example-master\dist has been removed. 70% 1/1 build modules
http://0.0.0.0:8080/
webpack result is served from /
content is served from ./app 30% 1/3 build modulescontent is served from ./app 44% 4/7 build modulescontent is served from ./app 61% 6/7 build modulescontent is served from ./app 54% 12/16 build modulescontent is served from ./app 62% 15/17 build modulescontent is served from ./app 45% 16/27 build modulescontent is served from ./app 35% 19/44 build modulescontent is served from ./app 49% 29/44 build modulescontent is served from ./app 65% 42/45 build modulescontent is served from ./app 48% 44/69 build modulescontent is served from ./app 52% 49/69 build modulescontent is served from ./app 62% 60/69 build modulescontent is served from ./app 66% 67/71 build modulescontent is served from ./app 69% 75/76 build modulescontent is served from ./app Hash: 2948e04a9d9577c7951d
Version: webpack 1.15.0
Time: 569ms
Asset Size Chunks Chunk Names
bundle.2948e04a9d9577c7951d.js 285 kB 0 [emitted] app
index.html 2.27 kB [emitted]
chunk {0} bundle.2948e04a9d9577c7951d.js (app) 227 kB [rendered]
[0] multi app 52 bytes {0} [built] [1 error]
[1] (webpack)-dev-server/client?http://0.0.0.0:8080 4.16 kB {0} [built]
[2] ./~/url/url.js 23.3 kB {0} [built]
[3] ./~/url/~/punycode/punycode.js 14.6 kB {0} [built]
[4] (webpack)/buildin/module.js 251 bytes {0} [built]
[5] ./~/url/util.js 314 bytes {0} [built]
[6] ./~/querystring/index.js 127 bytes {0} [built]
[7] ./~/querystring/decode.js 2.4 kB {0} [built]
[8] ./~/querystring/encode.js 2.09 kB {0} [built]
[9] ./~/strip-ansi/index.js 161 bytes {0} [built]
[10] ./~/ansi-regex/index.js 135 bytes {0} [built]
[11] (webpack)-dev-server/client/socket.js 897 bytes {0} [built]
[12] ./~/sockjs-client/lib/entry.js 244 bytes {0} [built]
[13] ./~/sockjs-client/lib/transport-list.js 613 bytes {0} [built]
[14] ./~/sockjs-client/lib/transport/websocket.js 2.72 kB {0} [built]
[15] ./~/process/browser.js 5.42 kB {0} [built]
[16] ./~/sockjs-client/lib/utils/event.js 2 kB {0} [built]
[17] ./~/sockjs-client/lib/utils/random.js 746 bytes {0} [built]
[18] ./~/sockjs-client/lib/utils/browser-crypto.js 438 bytes {0} [built]
[19] ./~/sockjs-client/lib/utils/url.js 975 bytes {0} [built]
[20] ./~/url-parse/index.js 12 kB {0} [built]
[21] ./~/requires-port/index.js 753 bytes {0} [built]
[22] ./~/querystringify/index.js 1.58 kB {0} [built]
[23] ./~/debug/src/browser.js 4.73 kB {0} [built]
[24] ./~/debug/src/debug.js 4.39 kB {0} [built]
[25] ./~/ms/index.js 2.76 kB {0} [built]
[26] ./~/inherits/inherits_browser.js 672 bytes {0} [built]
[27] ./~/sockjs-client/lib/event/emitter.js 1.27 kB {0} [built]
[28] ./~/sockjs-client/lib/event/eventtarget.js 1.85 kB {0} [built]
[29] ./~/sockjs-client/lib/transport/browser/websocket.js 210 bytes {0} [built]
[30] ./~/sockjs-client/lib/transport/xhr-streaming.js 1.25 kB {0} [built]
[31] ./~/sockjs-client/lib/transport/lib/ajax-based.js 1.31 kB {0} [built]
[32] ./~/sockjs-client/lib/transport/lib/sender-receiver.js 1.18 kB {0} [built]
[33] ./~/sockjs-client/lib/transport/lib/buffered-sender.js 2.3 kB {0} [built]
[34] ./~/sockjs-client/lib/transport/lib/polling.js 1.32 kB {0} [built]
[35] ./~/sockjs-client/lib/transport/receiver/xhr.js 1.58 kB {0} [built]
[36] ./~/sockjs-client/lib/transport/sender/xhr-cors.js 343 bytes {0} [built]
[37] ./~/sockjs-client/lib/transport/browser/abstract-xhr.js 4.8 kB {0} [built]
[38] ./~/sockjs-client/lib/transport/sender/xhr-local.js 352 bytes {0} [built]
[39] ./~/sockjs-client/lib/utils/browser.js 560 bytes {0} [built]
[40] ./~/sockjs-client/lib/transport/xdr-streaming.js 984 bytes {0} [built]
[41] ./~/sockjs-client/lib/transport/sender/xdr.js 2.46 kB {0} [built]
[42] ./~/sockjs-client/lib/transport/eventsource.js 766 bytes {0} [built]
[43] ./~/sockjs-client/lib/transport/receiver/eventsource.js 1.58 kB {0} [built]
[44] ./~/sockjs-client/lib/transport/browser/eventsource.js 37 bytes {0} [built]
[45] ./~/sockjs-client/lib/transport/lib/iframe-wrap.js 981 bytes {0} [built]
[46] ./~/sockjs-client/lib/transport/iframe.js 3.83 kB {0} [built]
[47] ./~/json3/lib/json3.js 43.3 kB {0} [built]
[48] (webpack)/buildin/amd-options.js 43 bytes {0} [built]
[49] ./~/sockjs-client/lib/version.js 26 bytes {0} [built]
[50] ./~/sockjs-client/lib/utils/iframe.js 5.04 kB {0} [built]
[51] ./~/sockjs-client/lib/utils/object.js 532 bytes {0} [built]
[52] ./~/sockjs-client/lib/transport/htmlfile.js 710 bytes {0} [built]
[53] ./~/sockjs-client/lib/transport/receiver/htmlfile.js 2.2 kB {0} [built]
[54] ./~/sockjs-client/lib/transport/xhr-polling.js 894 bytes {0} [built]
[55] ./~/sockjs-client/lib/transport/xdr-polling.js 712 bytes {0} [built]
[56] ./~/sockjs-client/lib/transport/jsonp-polling.js 1.02 kB {0} [built]
[57] ./~/sockjs-client/lib/transport/receiver/jsonp.js 5.57 kB {0} [built]
[58] ./~/sockjs-client/lib/transport/sender/jsonp.js 2.46 kB {0} [built]
[59] ./~/sockjs-client/lib/main.js 12 kB {0} [built]
[60] ./~/sockjs-client/lib/shims.js 17.2 kB {0} [built]
[61] ./~/sockjs-client/lib/utils/escape.js 2.36 kB {0} [built]
[62] ./~/sockjs-client/lib/utils/transport.js 1.35 kB {0} [built]
[63] ./~/sockjs-client/lib/utils/log.js 450 bytes {0} [built]
[64] ./~/sockjs-client/lib/event/event.js 477 bytes {0} [built]
[65] ./~/sockjs-client/lib/location.js 178 bytes {0} [built]
[66] ./~/sockjs-client/lib/event/close.js 295 bytes {0} [built]
[67] ./~/sockjs-client/lib/event/trans-message.js 292 bytes {0} [built]
[68] ./~/sockjs-client/lib/info-receiver.js 2.22 kB {0} [built]
[69] ./~/sockjs-client/lib/transport/sender/xhr-fake.js 456 bytes {0} [built]
[70] ./~/sockjs-client/lib/info-iframe.js 1.52 kB {0} [built]
[71] ./~/sockjs-client/lib/info-iframe-receiver.js 791 bytes {0} [built]
[72] ./~/sockjs-client/lib/info-ajax.js 1.03 kB {0} [built]
[73] ./~/sockjs-client/lib/iframe-bootstrap.js 2.9 kB {0} [built]
[74] ./~/sockjs-client/lib/facade.js 723 bytes {0} [built]
[75] (webpack)/hot/dev-server.js 1.85 kB {0} [built]
[76] (webpack)/hot/log-apply-result.js 813 bytes {0} [built]
ERROR in multi app
Module not found: Error: Cannot resolve 'file' or 'directory' ./main.js in D:\Workspace\pact-js\js00\pact-node-example-master\app
# multi app
ERROR in Error: Child compilation failed:
Entry module not found: Error: Cannot resolve 'file' or 'directory' D:\Workspace\pact-js\js00\pact-node-example-master\app\template.html in D:\Workspace\pact-js\js00\pact-node-example-master\app:
Error: Cannot resolve 'file' or 'directory' D:\Workspace\pact-js\js00\pact-node-example-master\app\template.html in D:\Workspace\pact-js\js00\pact-node-example-master\app
- compiler.js:76
[pact-node-example-master]/[html-webpack-plugin]/lib/compiler.js:76:16
- Compiler.js:214 Compiler.
[pact-node-example-master]/[webpack]/lib/Compiler.js:214:10
- Compiler.js:403
[pact-node-example-master]/[webpack]/lib/Compiler.js:403:12
- Tapable.js:67 Compiler.next
[pact-node-example-master]/[tapable]/lib/Tapable.js:67:11
- CachePlugin.js:40 Compiler.
[pact-node-example-master]/[webpack]/lib/CachePlugin.js:40:4
- Tapable.js:71 Compiler.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:71:13
- Compiler.js:400 Compiler.
[pact-node-example-master]/[webpack]/lib/Compiler.js:400:9
- Compilation.js:577 Compilation.
[pact-node-example-master]/[webpack]/lib/Compilation.js:577:13
- Tapable.js:60 Compilation.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:60:69
- Compilation.js:572 Compilation.
[pact-node-example-master]/[webpack]/lib/Compilation.js:572:10
- Tapable.js:60 Compilation.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:60:69
- Compilation.js:567 Compilation.
[pact-node-example-master]/[webpack]/lib/Compilation.js:567:9
- Tapable.js:60 Compilation.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:60:69
- Compilation.js:563 Compilation.
[pact-node-example-master]/[webpack]/lib/Compilation.js:563:8
- Tapable.js:60 Compilation.applyPluginsAsync
[pact-node-example-master]/[tapable]/lib/Tapable.js:60:69
- Compilation.js:525 Compilation.seal
[pact-node-example-master]/[webpack]/lib/Compilation.js:525:7
Child html-webpack-plugin for "index.html":
ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' D:\Workspace\pact-js\js00\pact-node-example-master\app\template.html in D:\Workspace\pact-js\js00\pact-node-example-maste
r\app
webpack: Failed to compile.
Finally, i created main.js and Template.html files. And i succeeded in compiling but i dont know what code to implement in my files!!
Thanks a lot
I'm using TensorFlow with Julia, but I can't use TensorFlow with my IDE Atom because it crash Julia.
The problem does not come from TensorFlow because it works in the terminal...
Here is the code that makes the editor crash:
julia> ENV["CUDA_VISIBLE_DEVICES"] = "0" # To use my GPU
"0"
julia> using TensorFlow
julia> sess = Session()
The exit error is the following:
signal (11): Erreur de segmentation
while loading no file, in expression starting on line 0
unknown function (ip: 0x7f33aa7aec7f)
emit_invoke at /buildworker/worker/package_linux64/build/src/codegen.cpp:3400 [inlined]
emit_expr at /buildworker/worker/package_linux64/build/src/codegen.cpp:4135
emit_function at /buildworker/worker/package_linux64/build/src/codegen.cpp:6101
jl_compile_linfo at /buildworker/worker/package_linux64/build/src/codegen.cpp:1256
emit_invoke at /buildworker/worker/package_linux64/build/src/codegen.cpp:3400 [inlined]
emit_expr at /buildworker/worker/package_linux64/build/src/codegen.cpp:4135
emit_assignment at /buildworker/worker/package_linux64/build/src/codegen.cpp:3759 [inlined]
emit_expr at /buildworker/worker/package_linux64/build/src/codegen.cpp:4159
emit_stmtpos at /buildworker/worker/package_linux64/build/src/codegen.cpp:4064 [inlined]
emit_function at /buildworker/worker/package_linux64/build/src/codegen.cpp:6248
jl_compile_linfo at /buildworker/worker/package_linux64/build/src/codegen.cpp:1256
jl_compile_for_dispatch at /buildworker/worker/package_linux64/build/src/gf.c:1668
jl_compile_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:307 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:354 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
#call#45 at /home/jabou/.julia/v0.6/TensorFlow/src/core.jl:569
unknown function (ip: 0x7f33880acf21)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
Type at /home/jabou/.julia/v0.6/TensorFlow/src/core.jl:563
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:75
eval at /buildworker/worker/package_linux64/build/src/interpreter.c:242
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:543
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:692
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:592
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:496
eval at ./boot.jl:235
unknown function (ip: 0x7f33a6bf0d2f)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
eval at ./boot.jl:234
unknown function (ip: 0x7f33a6d31a0b)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:75
eval at /buildworker/worker/package_linux64/build/src/interpreter.c:242
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:543
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:692
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:592
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:496
macro expansion at /home/jabou/.julia/v0.6/Atom/src/repl.jl:118 [inlined]
anonymous at ./<missing> (unknown line)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:589
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:496
eval at ./boot.jl:235
unknown function (ip: 0x7f33a6bf0d2f)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
eval_user_input at ./REPL.jl:66
unknown function (ip: 0x7f33a6c7218f)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
macro expansion at ./REPL.jl:97 [inlined]
#1 at ./event.jl:73
unknown function (ip: 0x7f338803f50f)
jl_call_fptr_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /buildworker/worker/package_linux64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:1926
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1424 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:267
unknown function (ip: 0xffffffffffffffff)
Allocations: 16440349 (Pool: 16435720; Big: 4629); GC: 37
Julia has exited. Press Enter to start a new session.
Thank you for your help...
EDIT
It works now, I just copied on my desk, then deleted the TensorFlow package from Julia. After I copied the package from my desk to Julia (I didn't change it)...
My child process is trying to access an PCI address space. It works fine most of the times.
But, sometimes the child process is going to zombie state. dmesg logs shows the following bus error.
[ 501.134156] Caused by (from MCSR=10008): Bus - Read Data Bus Error
[ 501.134169] Oops: Machine check, sig: 7 [#1]
There is no core file generated in this case.
[Linux:/]$ ps -axl | grep tes1
4 0 6805 32495 20 0 0 0 exit Zl ? 0:05 [test1] <defunct>
[Linux:/]$
Core is generated for SIGSEGV error by the child process. So I assume it has nothing to do with permission/ulimit settings.
Can someone help me to understand why core is not getting generated in this case?
Child Process:
--------------
[Linux:/]$ cat /proc/6805/status
Name: test1
State: Z (zombie)
Tgid: 6805
Pid: 6805
PPid: 32495
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
FDSize: 0
Groups:
Threads: 2
SigQ: 18/13007
SigPnd: 0000000002000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001006
SigCgt: 0000000182000200
CapInh: 0000000000000000
CapPrm: 0000001fffffffff
CapEff: 0000001fffffffff
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: 3
Cpus_allowed_list: 0-1
voluntary_ctxt_switches: 8998
nonvoluntary_ctxt_switches: 857
Stack:
-------
[Linux:/]$ cat /proc/6805/stack
[<00000000>] (nil)
[<c0008640>] __switch_to+0xc0/0x160
[<c004b4f4>] do_exit+0x5d4/0xa70
[<c000c694>] die+0x224/0x310
[<c000ce44>] machine_check_exception+0x124/0x1e0
[<c00123bc>] ret_from_mcheck_exc+0x0/0x14c
[Linux:/]$
Parent Process:
---------------
[Linux:/]$ cat /proc/32495/status
Name: test
State: S (sleeping)
Tgid: 32495
Pid: 32495
PPid: 21911
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
FDSize: 256
Groups:
VmPeak: 4820 kB
VmSize: 4820 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 2548 kB
VmRSS: 2548 kB
VmData: 1284 kB
VmStk: 132 kB
VmExe: 900 kB
VmLib: 1976 kB
VmPTE: 24 kB
VmSwap: 0 kB
Threads: 1
SigQ: 19/13007
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000010000
SigIgn: 0000000000001006
SigCgt: 0000000043816ef9
CapInh: 0000000000000000
CapPrm: 0000001fffffffff
CapEff: 0000001fffffffff
CapBnd: 0000001fffffffff
Seccomp: 0
Cpus_allowed: 3
Cpus_allowed_list: 0-1
voluntary_ctxt_switches: 274
nonvoluntary_ctxt_switches: 145
[Linux:/]$
I understand that the PCI hardware which is mmaped, is not responding. So, it is appropriate that only the kernel to deal with the error.
The error won't be propagated to user level, because this is not software fault. So, We do not get a core dump (either kernel or user space), since it is not a software failure.
The Machine check exception handler in the kernel tells what the hardware failure was, and what address/data is relevant (depending on the cause) - Need to be investigated from the hardware perspective further.