Advertisement
realtalker

Message -- README

Feb 12th, 2025 (edited)
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. Hi, i am currently trying to run a python script that navigate on the web with selenium and get the html of the product page on a web site and then do scraping to collect info. The info are stored in a database mariadb.
  2. I created a bash script that should run the python script, the bash script is this one:
  3.  
  4. #!/bin/bash
  5.  
  6. sleep 5
  7.  
  8. source /home/realtalker/data_workers/scraping_best/.venv/bin/activate
  9.  
  10. sleep 5
  11.  
  12. /home/realtalker/data_workers/scraping_best/.venv/bin/python /home/realtalker/data_workers/scraping_best/get_info_best.py
  13.  
  14. Then i did chmod +x to the bash script and to the python script. So it is executable.
  15. I tried first to run on the terminal the python script with python3 get_info_best.py and it worked. Then i tried to run the bash script on the terminal with at and it worked. The script run for like 10 minutes and after 7 minutes i tried atq and i could see that the script was running and checking the database i could see that the script worked. After checking this two things i
  16. added a job on cron that should execute the bash script at 4 am:
  17.  
  18. 0 4 * * * /bin/bash -x /home/realtalker/data_workers/scraping_best/get_info_best.sh >> /home/realtalker/data_workers/scraping_best/cron.log 2>&1
  19.  
  20.  
  21. But the next morning when i checked the cron log i found this message:
  22.  
  23. + sleep 5
  24. + source /home/realtalker/data_workers/scraping_best/.venv/bin/activate
  25. ++ deactivate nondestructive
  26. ++ '[' -n '' ']'
  27. ++ '[' -n '' ']'
  28. ++ hash -r
  29. ++ '[' -n '' ']'
  30. ++ unset VIRTUAL_ENV
  31. ++ unset VIRTUAL_ENV_PROMPT
  32. ++ '[' '!' nondestructive = nondestructive ']'
  33. ++ '[' linux-gnu = cygwin ']'
  34. ++ '[' linux-gnu = msys ']'
  35. ++ export VIRTUAL_ENV=/home/realtalker/data_workers/scraping_best/.venv
  36. ++ VIRTUAL_ENV=/home/realtalker/data_workers/scraping_best/.venv
  37. ++ _OLD_VIRTUAL_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  38. ++ PATH=/home/realtalker/data_workers/scraping_best/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  39. ++ export PATH
  40. ++ '[' -n '' ']'
  41. ++ '[' -z '' ']'
  42. ++ _OLD_VIRTUAL_PS1=
  43. ++ PS1='(.venv) '
  44. ++ export PS1
  45. ++ VIRTUAL_ENV_PROMPT='(.venv) '
  46. ++ export VIRTUAL_ENV_PROMPT
  47. ++ hash -r
  48. + sleep 5
  49. + /home/realtalker/data_workers/scraping_best/.venv/bin/python /home/realtalker/data_workers/scraping_best/get_info_best.py
  50.  
  51. Critic error in the process: Message: session not created: probably user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir
  52. Stacktrace:
  53. #0 0xaaaabff0c898 <unknown>
  54. #1 0xaaaabfa6cbb4 <unknown>
  55. #2 0xaaaabfa9f7e4 <unknown>
  56. #3 0xaaaabfa9bc5c <unknown>
  57. #4 0xaaaabfadeedc <unknown>
  58. #5 0xaaaabfade79c <unknown>
  59. #6 0xaaaabfaa7a1c <unknown>
  60. #7 0xaaaabfaa87bc <unknown>
  61. #8 0xaaaabfed9b1c <unknown>
  62. #9 0xaaaabfeddda4 <unknown>
  63. #10 0xaaaabfec902c <unknown>
  64. #11 0xaaaabfede638 <unknown>
  65. #12 0xaaaabfeb04a4 <unknown>
  66. #13 0xaaaabfefb220 <unknown>
  67. #14 0xaaaabfefb3f4 <unknown>
  68. #15 0xaaaabff0b54c <unknown>
  69. #16 0xffffbd275958 <unknown>
  70. #17 0xffffbd2dba48 <unknown>
  71.  
  72. I think that the problem at this point is with cron or chromium, i am on a Rasberry pi 5 on Ubuntu, the version of Chromium is Chromium 132.0.6834.159 snap and the version of the chromedriver is ChromeDriver 132.0.6834.83 (36d3e67544e087c21630e290d4f024723cd55338-refs/heads/main@{#1389833})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement