Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    C4D R21.207 Console don't do anything

    Cinema 4D SDK
    r21 python
    4
    10
    1.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Crea
      last edited by m_adam

      d3f4d85d-e280-4f24-a257-fafa7f91138e-image.png
      No matter what I do,
      print, drag, calculate ,etc.
      No result comes out.

      How to fix this, please.

      1 Reply Last reply Reply Quote 0
      • B
        bentraje
        last edited by

        @Crea

        I have a similar problem before. I think it has a bug on the layout.
        Try resetting your default layout. Restart Cinema4D. Access Console again.

        1 Reply Last reply Reply Quote 0
        • M
          m_adam
          last edited by

          Hi unfortunately I can't reproduce either on R21.207 or on R23.008.

          So could you share a clear repro step?

          Finally as suggested by @bentraje, closing the dialog and re-open it should fix the issue, however, please try to reproduce and share with us reproduction step, this way we can fix it.

          Thanks in advance,
          Cheers,
          Maxime.

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

          C 1 Reply Last reply Reply Quote 0
          • C
            Crea @m_adam
            last edited by

            @m_adam
            reset tried and can't do.
            Here is the problem dropbox link.
            https://www.dropbox.com/h?preview=problem.mp4

            1 Reply Last reply Reply Quote 0
            • M
              m_adam
              last edited by m_adam

              Even Restarting Cinema 4D doesn't fix the issue?
              Could you try to remove all your plugins?

              I can't see your link, this is a local link to your own dropbox space.

              Cheers,
              Maxime.

              MAXON SDK Specialist

              Development Blog, MAXON Registered Developer

              C 1 Reply Last reply Reply Quote 0
              • C
                Crea @m_adam
                last edited by

                @m_adam
                Nope.
                Even I restart it, plus remoing all my plugin, ain't no fixing happening.

                https://www.dropbox.com/s/kudn4ol6j7zg8hn/problem.mp4?dl=0

                1 Reply Last reply Reply Quote 0
                • ferdinandF
                  ferdinand
                  last edited by ferdinand

                  Hi,

                  it doesn't have to be a plugin, it could also be a package or just some script you have floating around in one of the paths c4dpy is looking for modules. The whole thing looks like something or someone does reroute sys.stdout. Run this code in the script manager (save the script before running it), it will put a text file into the same directory, which will tell you what Python thinks it should output to by default.

                  import sys
                  
                  with open("result.txt", "w+") as f:
                      f.write(str(sys.stdout))
                  

                  It should say something like this:

                  <open file '<stdout>', mode 'w' at 0x0000000002A3F150>
                  

                  Otherwise something is modifying your default output device.

                  Cheers,
                  zipit

                  MAXON SDK Specialist
                  developers.maxon.net

                  1 Reply Last reply Reply Quote 1
                  • M
                    m_adam
                    last edited by

                    Nice idea @zipit, however the result should be something like

                    <_maxon_init.StdOutCatcher object at 0x000002CF0BC49F98>
                    

                    Regarding your issue, in the attached mp4 I still see some plugins loaded (but I guess it's because you made the video before removing them)

                    Could you try to:

                    1. Write in Python console directly (after the 3 >>>), and not within the CommandLine to see if it come from the CommandLine (while I'm still not able to reproduce).
                    2. What is your Cinema 4D Installation path? Does it contains unicode character?)
                    3. Do Python plugins are loaded?
                    4. Could you try to copy/paste the Cinema 4D installation directory to another place (This way fresh preference folder will be created)

                    Cheers,
                    Maxime.

                    MAXON SDK Specialist

                    Development Blog, MAXON Registered Developer

                    ferdinandF 1 Reply Last reply Reply Quote 0
                    • ferdinandF
                      ferdinand @m_adam
                      last edited by ferdinand

                      @m_adam said in C4D R21.207 Console don't do anything:

                      Nice idea @zipit, however ...

                      Hi,

                      oh, I didn't knew that, although it makes sense that Cinema writes into its own file object. One thing that immediately came to mind though was the question if you guys also overwrite sys.__stdout__ (which you don't, the attribute references Cpython's default output stream object). So the pretty common piece of Python code sys.stdout = sys.__stdout__, which is usually invoked after one was messing around with stdout, could be a culprit for the predicament @Crea is in. You probably want to fix that or least mention how the c4dpy way of doing this is in the docs (which would be storing your own reference to the default file object).

                      For clarity a whole example:

                      #!c4dpy
                      import sys
                      
                      sys.stdout =  sys.__stdout__
                      # Won't print anything anymore, since sys.__stdout__ is Python's default
                      # std out file object and not the Maxon thingy.
                      print "Bob is your uncle"
                      

                      Cheers,
                      zipit

                      MAXON SDK Specialist
                      developers.maxon.net

                      1 Reply Last reply Reply Quote 0
                      • C
                        Crea
                        last edited by

                        Finally fix it! I reinstalled c4d and everything goes well! Thank you for all you helps!

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post