Trying to access LFS in streamlit through github URL but it's giving me this error

:rotating_light: Before clicking “Create Topic”, please make sure your post includes the following information (otherwise, the post will be locked). :rotating_light:

  1. Are you running your app locally or is it deployed? - deployed

  2. If your app is deployed:
    a. Is it deployed on Community Cloud or another hosting platform? - community cloud

    b. Share the link to the public deployed app. - Streamlit (

  3. Share the link to your app’s public GitHub repository (including a requirements file).
    GitHub - Yasasree-Singam/Data-Mining-Project: Data Mining Project implementation

  4. Share the full text of the error message (not a screenshot).
    http.client.InvalidURL: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).
    File “/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/”, line 565, in _run_script
    exec(code, module.dict)
    File “/mount/src/data-mining-project/”, line 10, in
    from classification import train_random_forest, train_svm, train_knn, plot_confusion_matrix
    File “/mount/src/data-mining-project/”, line 17, in
    X_train, X_valid, X_test, y_train, y_valid, y_test, le_crime, transformer = preprocess_data()
    File “/mount/src/data-mining-project/”, line 10, in preprocess_data
    data_balance, crime = clean_data()
    File “/mount/src/data-mining-project/”, line 13, in clean_data
    crime = pd.read_csv(crime_data_url)
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/parsers/”, line 948, in read_csv
    return _read(filepath_or_buffer, kwds)
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/parsers/”, line 611, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/parsers/”, line 1448, in init
    self._engine = self._make_engine(f, self.engine)
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/parsers/”, line 1705, in _make_engine
    self.handles = get_handle(
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/”, line 718, in get_handle
    ioargs = _get_filepath_or_buffer(
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/”, line 372, in _get_filepath_or_buffer
    with urlopen(req_info) as req:
    File “/home/adminuser/venv/lib/python3.9/site-packages/pandas/io/”, line 274, in urlopen
    return urllib.request.urlopen(*args, **kwargs)
    File “/usr/local/lib/python3.9/urllib/”, line 214, in urlopen
    return, data, timeout)
    File “/usr/local/lib/python3.9/urllib/”, line 517, in open
    response = self._open(req, data)
    File “/usr/local/lib/python3.9/urllib/”, line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
    File “/usr/local/lib/python3.9/urllib/”, line 494, in _call_chain
    result = func(*args)
    File “/usr/local/lib/python3.9/urllib/”, line 1389, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
    File “/usr/local/lib/python3.9/urllib/”, line 1346, in do_open
    h.request(req.get_method(), req.selector,, headers,
    File “/usr/local/lib/python3.9/http/”, line 1285, in request
    self._send_request(method, url, body, headers, encode_chunked)
    File “/usr/local/lib/python3.9/http/”, line 1296, in _send_request
    self.putrequest(method, url, **skips)
    File “/usr/local/lib/python3.9/http/”, line 1130, in putrequest
    File “/usr/local/lib/python3.9/http/”, line 1230, in _validate_path
    raise InvalidURL(f"URL can’t contain control characters. {url!r} "

  5. Share the Streamlit and Python versions.

Hey @Yasasree-Singam,

Thanks for sharing your question. How can I reproduce the error? I’m interacting with the app but not seeing an error

Hello @Caroline

Thanks for the quick response
I reduced my file size to less than 20mb and started running my app as the issue was still persisting at that moment.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.