256 Kilobytes

Scripting and Automation > Scripting

Type All Category Scripting and AutomationInformation and discussion of scripting of various types. Tag Scripting

Profile Photo - Hash Brown

An introduction to scraping with Python and BeautifulSoup

Articles in Web Scraping, Data Analysis | By Hash Brown

Published | Last Update 📌

Profile Photo - August R. Garcia

Last ReplyVery nice, as they say. Other scraping methods For those who don’t perhaps have the skills needed to code something there are also other... August R. Garcia,

Very nice, as they say.

Wed, 09 Jan 2019 03:16:31 -08001 year ago1
🗨 1
🐏 1
👁 1,806
Profile Photo - Some Guy
Profile Photo - Default

Last ReplyThe error message 'xrange' is not defined would seem to indicate that you are trying to run a Python 2 codebase with Python 3 . In Python 2, an iterab... murphybeck,

The error message 'xrange...

Sun, 12 Jul 2020 23:33:47 -07003 days ago1
🗨 1
🐏 0
👁 227
Profile Photo - Some Guy
Profile Photo - Default

Last ReplyPython makes a clear distinction between bytes and strings . Bytes objects contain raw data — a sequence of octets — whereas strings are U... bennetcole,

Python makes a clear dist...

Fri, 22 May 2020 03:51:31 -07001 month ago1
🗨 2
🐏 0
👁 420
Profile Photo - Some Guy
Profile Photo - rahuldev

Last ReplyWhen we try to use float numbers in Python range() function, we get a type error 'float' object that cannot be interpreted as an integer.&nb... rahuldev,

When we try to use float...

Tue, 24 Mar 2020 04:03:43 -07003 months ago1
🗨 2
🐏 0
👁 2,817
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last ReplyExplicitly cast the int object to a string: x = 10 # Integer print("X is set to " + str(10)) # Explicitly a string August R. Garcia,

Explicitly cast the int o...

Wed, 05 Feb 2020 13:31:04 -08005 months ago1
🗨 3
🐏 0
👁 593
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last ReplyIf there are some scenarios where the value is actually not intended to be a number, this can also be solved with a try-catch block: try: #... August R. Garcia,

If there are some scenari...

Tue, 03 Dec 2019 13:33:18 -08007 months ago1
🗨 2
🐏 0
👁 7,171
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last ReplyWhat the fuck is this question. This is like eight different errors. The answer is probably to cast something as something else. Look at this thread:... August R. Garcia,

What the fuck is this que...

Thu, 17 Oct 2019 14:04:45 -07008 months ago1
🗨 1
🐏 0
👁 270
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last ReplyCast the integer to be a string. # Probably something like this is causing the error x = 3 text = "whatever" # "TypeError: unsupported op... August R. Garcia,

Cast the integer to be a...

Thu, 17 Oct 2019 14:03:15 -07008 months ago1
🗨 2
🐏 0
👁 2,676
Profile Photo - Some Guy
Profile Photo - Univa

Last ReplyA simple case that generates this error message: In [8]: [1,2,3,4,5][np.array([1])] --------------------------------------------------------------... Univa,

A simple case that genera...

Sat, 01 Jun 2019 09:14:49 -07001 year ago1
🗨 1
🐏 0
👁 636
Profile Photo - Some Guy
Profile Photo - Univa

Last ReplyIn case you get this error it might also be related to how you included the javascript file into your html page. When loading modules you have to expl... Univa,

In case you get this erro...

Sun, 26 May 2019 10:46:17 -07001 year ago1
🗨 1
🐏 0
👁 389
Profile Photo - Some Guy
Profile Photo - Univa

Last ReplyTypeerror This Constructor Takes No Arguments Python Error error codes are caused, in one way or another, by misconfigured system files in your Window... Univa,

Typeerror This Constructo...

Fri, 26 Apr 2019 08:18:20 -07001 year ago1
🗨 1
🐏 0
👁 375
Profile Photo - Some Guy
Profile Photo - Univa

Last ReplyBefore posting any codes try using the formatting tools, sometimes it solves the problem.  You can also try pasting this code:  a_str,... Univa,

Before posting any codes...

Sun, 14 Apr 2019 03:06:36 -07001 year ago1
🗨 1
🐏 0
👁 458
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last ReplyYou probably have your code set up where some value can either be: An array (or whatever) iterable object or False or None (for when... August R. Garcia,

You probably have your&nb...

Sun, 07 Apr 2019 12:14:43 -07001 year ago1
🗨 1
🐏 0
👁 2,972
Profile Photo - SMVVR2

Best way to rename part of filename in multiple files?

Answers in Scripting and Automation | By SMVVR2

Published

Profile Photo - Edgelady43069

Last ReplyThis is the easiest and quickest way: 1. Open File Explorer. 2. Browse to the folder that includes all the files you want to rename. 3. Select the fir... Edgelady43069,

This is the easiest and q...

Wed, 20 Mar 2019 02:02:20 -07001 year ago1
🗨 1
🐏 0
👁 295
Profile Photo - Some Guy
Profile Photo - roxblade

Last ReplyPickle protocol can be simply referred to as the file format. The higher the protocol is, the more recent version of python is what you need to read t... roxblade,

Pickle protocol can be si...

Wed, 27 Feb 2019 13:31:12 -08001 year ago1
🗨 1
🐏 0
👁 2,209
Profile Photo - Some Guy
Profile Photo - Default

Last ReplyThis error TypeError: document.getelementbyid(...) is null would seem to indicate that there is no such element with an ID passed to getElementById()... jacobhalls,

This error TypeError: doc...

Sun, 24 Feb 2019 21:30:19 -08001 year ago1
🗨 1
🐏 0
👁 439
Profile Photo - Some Guy
Profile Photo - Hash Brown

Last ReplyHello, You're trying to decode a JSON string by the sound of it. The most common errors for these sorts of things are: The JSON string is not... Hash Brown,

Hello,

Thu, 21 Feb 2019 14:37:41 -08001 year ago1
🗨 1
🐏 0
👁 398
Profile Photo - Some Guy
Profile Photo - Hash Brown

Last Reply>Can you find me a forum entry on a coding site that deals with fixing this exact type error? k. These errors are ususally created when you c... Hash Brown,

>Can you find me a for...

Wed, 20 Feb 2019 06:09:44 -08001 year ago1
🗨 1
🐏 0
👁 2,982
Profile Photo - Some Guy
Profile Photo - Hash Brown

Last ReplyPython 3 docs say: "Construct an iterator from those elements of iterable for which function returns true." Source: https://docs.python... Hash Brown,

Python 3 docs say:

Wed, 20 Feb 2019 04:39:57 -08001 year ago1
🗨 1
🐏 0
👁 1,229
Profile Photo - Some Guy
Profile Photo - Hash Brown

Last ReplyHello dude, len() gets the length of a string. The data passed to it has to be a string, that's just how it works. So if you're trying to pass a... Hash Brown,

Hello dude,

Wed, 20 Feb 2019 03:40:58 -08001 year ago1
🗨 1
🐏 0
👁 530
Profile Photo - Some Guy
Profile Photo - roxblade

Last ReplyYou're trying to change a part of a string. That isn't supported by many object-oriented programming languages. Unicode objects like * are used to cha... roxblade,

You're trying to change a...

Thu, 07 Feb 2019 02:52:20 -08001 year ago1
🗨 1
🐏 0
👁 744
Profile Photo - Some Guy
Profile Photo - roxblade

Last ReplyThis error usually throws up when you think you're adding a float element to the argument but you're not.This problem most commonly arises from the us... roxblade,

This error usually throws...

Thu, 07 Feb 2019 02:45:42 -08001 year ago1
🗨 1
🐏 0
👁 299
Profile Photo - Some Guy
Profile Photo - roxblade

Last ReplyOnly lists can be cocatenated with other list elements. Only same data types can be cocatenated. Further, Python cannot convert the string element in... roxblade,

Only lists can be cocaten...

Thu, 07 Feb 2019 02:25:53 -08001 year ago1
🗨 1
🐏 0
👁 343
Profile Photo - Some Guy
Profile Photo - roxblade

Last ReplyCocatenation only happens between similar data objects. Here, you must be trying to cocatenate a string with a tuple, which Python can't do. So, it th... roxblade,

Cocatenation only happens...

Thu, 07 Feb 2019 02:14:14 -08001 year ago1
🗨 1
🐏 0
👁 1,813
Profile Photo - Some Guy
Profile Photo - roxblade

Last ReplyThis is an error that arises when you try to cocatenate two different data types. Bytes object cannot go with the string object. And the Python compil... roxblade,

This is an error that ari...

Thu, 07 Feb 2019 02:09:08 -08001 year ago1
🗨 1
🐏 0
👁 342
Profile Photo - Some Guy
Profile Photo - roxblade

Last ReplyYou're probably using an XML parser which produces a string. So, the multiplication doesn't work, because it's not natural for Python. Strings cannot... roxblade,

You're probably using an...

Thu, 07 Feb 2019 02:00:26 -08001 year ago1
🗨 1
🐏 0
👁 578
Profile Photo - Some Guy
Profile Photo - roxblade

Last ReplyWelcome to the world of Python! It can totally be a pain sometimes. More often than not, in my opinion. Now, this problem arises due to a number of re... roxblade,

Welcome to the world of P...

Thu, 07 Feb 2019 01:56:58 -08001 year ago1
🗨 1
🐏 0
👁 713
Profile Photo - Some Guy
Profile Photo - roxblade

Last ReplyThis is not a very rare HTML problem. The Python function is basically returning nothing. It's a common coding problem. My advice would be checking th... roxblade,

This is not a very rare H...

Thu, 07 Feb 2019 01:49:06 -08001 year ago1
🗨 2
🐏 0
👁 345
Profile Photo - Some Guy
Profile Photo - roxblade

Last ReplyBoth arrays (NumPy or otherwise) need to be of the same dimension. This error throws up when one is 2D and another 1D. You can try printing both the a... roxblade,

Both arrays (NumPy or oth...

Wed, 06 Feb 2019 18:58:27 -08001 year ago1
🗨 1
🐏 0
👁 829
Profile Photo - Some Guy
Profile Photo - roxblade

Last ReplyIt's quite self-explanatory. This happens in matplotlib graph plotting. You can first of all attempt making x and y NumPy arrays. NumPy is also a libr... roxblade,

It's quite self-explanato...

Wed, 06 Feb 2019 18:49:13 -08001 year ago1
🗨 1
🐏 0
👁 559