Jump to content

arabich

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by arabich

  1. I guess there might be different versions of Python on your machine and the server.

     

    You can try marking the string literal with the , like this [new_message = u'....'] and putting the utf-8 pragma [# coding: utf-8] at the top of your files.

    That may make it work on the server, and possibly fail on your machine, depending on the versions.

    Thank you for answering!! Following your solution, now: 

    it doesn't give a 500 error regarding non-English String, however it still can't be printed 

     

    The only way to print it, is as a "unicode", generating this output 

     

    u'\u0627\u0644\u0643\u0648\u0646 \u0647\u0648

     

     

     

    other than that nothing even shows on the screen. 

     

    I'm sorry for such a bad explanation, and thank you very much for replying!! 

     

     

    UPDATE: FIXED! Thank you a lot

  2. Greeting, 

    This a newpie here, I got a problem (500 error) with the server caused by this code

    new_message = "<p dir=\"rtl\" lang=\"ar\" style=\"color:#e0e0e0;font-size:20px;\">رَبٍّ زِدْنٍي عِلمًا</p>"
    
    

    it works with my python shell, but not on the server, is the server cgi files can't take a foreign language? 

    or is it my code? I'm not sure what to do to fix this. Please help me out! 

     

    Thank you so much!! I appreciate your hard work

     

     

     

    UPDATE: FIXED! Thank you a lot

    UPDATE: FIXED! Thank you a lot

  3. Greetings, 

     

    I am new to heliohost, using Ricky, and I'm working on a project that required 2 python libraries that wasn't available on heliohost.

    This is the version that works for me without getting a 500 error

    #!/usr/bin/python
    

    I'm not sure which version is running with that definition, but it's the only one working.

    I really need the NLTK version after 2017 (NLTK 3.3 or above) and heapq package to complete my code please if it's capable on the server. 

    If it's not possible, I would really appreciate it if you could help me to install it directly with the pip! 

     

    PS: I tried to install it using various ways, one of it was (got 500 error): 

    #!/usr/bin/python
    import cgi
    from subprocess import call
    from sys import executable
    import pip
    call([executable,'-m', 'pip', 'install','--trusted-host=pypi.org', '--trusted-host=files.pythonhosted.org', 'nltk']) 

    Thank you very very much for your work!!

    Please keep the awesome work

×
×
  • Create New...