Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails for new project #3732

Closed
rgerum opened this issue Mar 5, 2018 · 11 comments
Closed

Build fails for new project #3732

rgerum opened this issue Mar 5, 2018 · 11 comments
Labels
Bug A bug

Comments

@rgerum
Copy link

rgerum commented Mar 5, 2018

Details

Expected Result

A description of what you wanted to happen

ReadTheDocs should clone the repository and build the documentation.

Actual Result

A description of what actually happened

ReadTheDocs clones the repository without problems, but then crashes without giving a proper error message. I just receive:

There was a problem with Read the Docs while building your documentation. Please report this to us with your build id (6841210).

All the output of the commands ReadTheDocs executed was without errors:

hg clone https://bitbucket.org/randrian/open_gpias .
hg update --clean default
hg tags
hg branches

@stsewd
Copy link
Member

stsewd commented Mar 6, 2018

I can't see your builds, I think it's because of your project privacy level. I'll try to reproduce it on my local installation.

@stsewd
Copy link
Member

stsewd commented Mar 6, 2018

Sorry that you are having this problem on your new project, seems like a unicode error. This is because of this file. Any possibility that you can rename the file? Otherwise you need to wait for readthedocs/readthedocs-build#27 gets fixed.

@stsewd
Copy link
Member

stsewd commented Mar 6, 2018

I found a fix readthedocs/readthedocs-build#27 (comment), lets wait to get a reply on the other issue :)

@rgerum
Copy link
Author

rgerum commented Mar 6, 2018

Thank you. I have removed the Unicode character in the filename and now it works :-). But nevertheless, it would be good to fix the bug, or at least provide a meaningful error message.

@RichardLitt RichardLitt added Bug A bug and removed Support Support question labels Mar 6, 2018
@RichardLitt
Copy link
Member

That would be a great idea for a PR! Would you be able to file that, @Randrian45?

@stsewd
Copy link
Member

stsewd commented Mar 6, 2018

@Randrian45 while trying to fix the issue readthedocs/readthedocs-build#45 (comment) I came up with some questions, hope you can help me with that. What OS did you use when creating the file? What is the default encoding of that OS?

Also, could you create a file outside mercurial with some especial characters and run this script? python2 test.py and tell me if that fails. Just to test if this isn't related to a corrupted mercurial file.

# test.py
import os


def find_all(path, filenames):
    path = os.path.abspath(path)
    for root, dirs, files in os.walk(path, topdown=True):
        dirs.sort()
        for filename in filenames:
            if filename in files:
                yield os.path.abspath(os.path.join(root, filename))


def find_one(path, filenames):
    for _path in find_all(path, filenames):
        return _path
    return ''

find_one(
    u'/path/to/a/dir/with/a/file/created/by/you/outside/mercurial/with/special/chars/',
    ('readthedocs.yml', '.readthedocs.yml')
)

@rgerum
Copy link
Author

rgerum commented Mar 7, 2018

I did not create the file myself but received it from a colleague over the mercurial repository. I asked him what OS he did use, and he said that it probably was Windows 7, I think with German settings, or at least a german keyboard layout.
When I try to run your script on my computer, I do not get any fails when the directory contains files with special characters.

@stsewd
Copy link
Member

stsewd commented Mar 7, 2018

@Randrian45 do you also use Windows?. I'll try to see if I can reproduce this with Windows

@rgerum
Copy link
Author

rgerum commented Mar 7, 2018

Yes, I also use Windows, but Windows10, with German settings.

@humitos
Copy link
Member

humitos commented Mar 7, 2018

I'd say that the file is corrupted: it's supposed that its name is in one encoding but it's in another. So, we try to read it's from the filesystem and it fails on decoding it.

We should probably have a try/except block for this and skip the corrupted files.

stsewd added a commit to stsewd/readthedocs.org that referenced this issue Jun 13, 2018
Probably the file was corrupted,
the test pass with a proper unicode filename.
See readthedocs#3732 (comment)
agjohnson pushed a commit that referenced this issue Jun 14, 2018
* Import parser tests

* Move code

* Linter

* Move utils module

* Isort

* Move tests for find.py

* Move implementation from find.py

* Add fixture

* Fix path for test

* Fix test about encoding

Probably the file was corrupted,
the test pass with a proper unicode filename.
See #3732 (comment)

* Linter

* Isort

* Remove wrong assert

We are using unicode literals
@stsewd
Copy link
Member

stsewd commented Jun 15, 2018

Closing as we can't replicate. Probably it was a corrupted file as mention in #3732 (comment). And we have a test for this too (passing).

@stsewd stsewd closed this as completed Jun 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug
Projects
None yet
Development

No branches or pull requests

4 participants